1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 #ifndef __OUTLINE_MODEL_BUILDER__
27 #define __OUTLINE_MODEL_BUILDER__
30 //------------------------------------------------------------------------------------------------------------
32 //------------------------------------------------------------------------------------------------------------
38 #include "ReaderEnvironment.h"
39 #include "SomeEnvironment.h"
40 #include "ContourThing.h"
42 #include "ImageSourceThing.h"
43 #include "ImageSectionThing.h"
47 class OutlineModelBuilder{
49 //------------------------------------------------------------------------------------------------------------
50 // Constructors & Destructors
51 //------------------------------------------------------------------------------------------------------------
55 * Creates an OutlineModelBuilder
56 * @ param filesNames Paired set of files with the names of the files to read ConceptsFileName, ImageSourcesFile, ImageSectionsFile, AxeThingsFile, ContoursFile
57 * @ param sources Paired set of sourceKeyName-ImageSourceThing
58 * @ param sections Paired set of sectionKeyName-ImageSectionThing
59 * @ param axes Paired set of axeKeyName-AxeThing
60 * @ param outlines Paired set of contoKeyName-ContourThing
62 OutlineModelBuilder(std::string conceptsFile, std::string datadir = "data" );//std::map<std::string, std::string> filesNames, std::map<std::string, ImageSourceThing *> * sources, std::map<std::string, ImageSectionThing *>* sections, std::map<std::string, AxeThing *>* axes, std::map<std::string, ContourThing *>* outlines);
65 * Destroys an AxeThing
67 ~OutlineModelBuilder();
68 //------------------------------------------------------------------------------------------------------------
70 //------------------------------------------------------------------------------------------------------------
73 * Gets the ImageSourceThing environment
76 SomeEnvironment<ImageSourceThing *> * getImSourceEnv();
78 * Gets the ImageSectionThing environment
81 SomeEnvironment<ImageSectionThing *> * getImSectionEnv();
83 * Gets the AxeThing environment
86 SomeEnvironment<AxeThing *> * getAxesEnv();
88 * Gets the ContourThing environment
91 SomeEnvironment<ContourThing *> * getContourEnv();
94 * Builds the ImageSourceThing * environment
95 * @param sourcesFile File path with the object key names and specific instants for each one
96 * @param sources The sources to include in the enivorment
98 void buildImageSource_Envornment( std::string sourcesFile, std::map<std::string, ImageSourceThing *> * sources );
101 * Builds the ImageSectionThing * environment
102 * @param sectionsFile File path with the object key names and specific instants for each one
103 * @param sections The sections to include in the enivorment
105 void buildImageSection_Envornment( std::string sectionsFile, std::map<std::string, ImageSectionThing *>* sections );
108 * Builds the AxeThing * environment
109 * @param axesFile File path with the object key names and specific instants for each one
110 * @param axes The axes to include in the enivorment
112 void buildAxe_Envornment( std::string axesFile, std::map<std::string, AxeThing *>* axes );
115 * Builds the CountourThing * environment
116 * @param outlinesFile File path with the object key names and specific instants for each one
117 * @param outlines The outlines to include in the enivorment
119 void buildCountour_Envornment( std::string outlinesFile, std::map<std::string, ContourThing *>* outlines );
122 //------------------------------------------------------------------------------------------------------------
124 //------------------------------------------------------------------------------------------------------------
127 * Represents the environment builder based of reading files of axes
129 ReaderEnvironment<AxeThing *> *axesEnv_Reader;
132 * Represents the environment builder based of reading files of section images
134 ReaderEnvironment<ImageSectionThing *> *imagesSectionEnv_Reader;
137 * Represents the environment builder based of reading files of source images (Generally a complete volume data per image)
139 ReaderEnvironment<ImageSourceThing *> *imageSourceEnv_Reader;
142 * Represents the environment builder based of reading files of outlines (outlines)
144 ReaderEnvironment<ContourThing *> * outlinesEnv_Reader;
149 std::string conceptsFile;
151 std::string imagesSectionEnvOtherConceptsFN;
153 std::string outlinesEnvOtherConceptsFN;
155 std::string axesEnvOtherConceptsFN;