]> Creatis software - creaContours.git/blob - lib/kernel_ManagerContour_NDimensions/OutlineModelBuilder.h
c3c5bbafcb800ca33f6feed63230c64da1982e93
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / OutlineModelBuilder.h
1 #ifndef __OUTLINE_MODEL_BUILDER__
2 #define __OUTLINE_MODEL_BUILDER__
3
4
5 //------------------------------------------------------------------------------------------------------------
6 // Includes
7 //------------------------------------------------------------------------------------------------------------
8 #include <iostream>
9 #include <vector>
10 #include <string>
11
12
13 #include "ReaderEnvironment.h"
14 #include "SomeEnvironment.h"
15 #include "ContourThing.h"
16 #include "AxeThing.h"
17 #include "ImageSourceThing.h"
18 #include "ImageSectionThing.h"
19
20
21
22 class OutlineModelBuilder{
23
24 //------------------------------------------------------------------------------------------------------------
25 // Constructors & Destructors
26 //------------------------------------------------------------------------------------------------------------
27 public:
28
29         /**
30         * Creates an OutlineModelBuilder
31         * @ param filesNames Paired set of files with the names of the files to read ConceptsFileName, ImageSourcesFile, ImageSectionsFile, AxeThingsFile, ContoursFile
32         * @ param sources Paired set of sourceKeyName-ImageSourceThing
33         * @ param sections Paired set of sectionKeyName-ImageSectionThing
34         * @ param axes Paired set of axeKeyName-AxeThing
35         * @ param outlines Paired set of contoKeyName-ContourThing
36         */
37         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);
38
39         /**
40         * Destroys an AxeThing
41         */
42         ~OutlineModelBuilder();
43 //------------------------------------------------------------------------------------------------------------
44 // Methods
45 //------------------------------------------------------------------------------------------------------------
46
47         /**
48         * Gets the ImageSourceThing environment
49         *@param  ImSourceEnv 
50         */
51     SomeEnvironment<ImageSourceThing *> * getImSourceEnv();
52         /**
53         * Gets the ImageSectionThing environment
54         *@param  imSectionEnv 
55         */
56         SomeEnvironment<ImageSectionThing *> * getImSectionEnv();
57         /**
58         * Gets the AxeThing environment
59         *@param  AxesEnv
60         */
61         SomeEnvironment<AxeThing *> * getAxesEnv();
62         /**
63         * Gets the ContourThing environment
64         * @param  ContourEnv 
65         */
66         SomeEnvironment<ContourThing *> * getContourEnv();
67         
68         /**
69         * Builds the ImageSourceThing * environment
70         * @param sourcesFile File path with the object key names and specific instants for each one
71         * @param sources The sources to include in the enivorment
72         */
73         void buildImageSource_Envornment( std::string sourcesFile, std::map<std::string, ImageSourceThing *> * sources );
74
75         /**
76         * Builds the ImageSectionThing * environment
77         * @param sectionsFile File path with the object key names and specific instants for each one
78         * @param sections The sections to include in the enivorment
79         */
80         void buildImageSection_Envornment( std::string sectionsFile, std::map<std::string, ImageSectionThing *>* sections );
81
82         /**
83         * Builds the AxeThing * environment
84         * @param axesFile File path with the object key names and specific instants for each one
85         * @param axes The axes to include in the enivorment
86         */
87         void buildAxe_Envornment( std::string axesFile, std::map<std::string, AxeThing *>* axes );
88
89         /**
90         * Builds the CountourThing * environment
91         * @param outlinesFile File path with the object key names and specific instants for each one
92         * @param outlines The outlines to include in the enivorment
93         */
94         void buildCountour_Envornment( std::string outlinesFile, std::map<std::string, ContourThing *>* outlines );
95
96 private:
97 //------------------------------------------------------------------------------------------------------------
98 // Attributes
99 //------------------------------------------------------------------------------------------------------------
100         
101         /**
102         * Represents the environment builder based of reading files of axes
103         */
104         ReaderEnvironment<AxeThing *> *axesEnv_Reader;
105
106         /**
107         *  Represents the environment builder based of reading files of section images 
108         */
109         ReaderEnvironment<ImageSectionThing *> *imagesSectionEnv_Reader;
110
111         /**
112         * Represents the environment builder based of reading files of source images (Generally a complete volume data per image) 
113         */
114         ReaderEnvironment<ImageSourceThing *>  *imageSourceEnv_Reader;
115
116         /**
117         * Represents the environment builder based of reading files of outlines (outlines)
118         */
119         ReaderEnvironment<ContourThing *> * outlinesEnv_Reader;
120
121         /*
122         *
123         */
124         std::string conceptsFile;
125
126         std::string imagesSectionEnvOtherConceptsFN;
127
128         std::string outlinesEnvOtherConceptsFN;
129
130         std::string axesEnvOtherConceptsFN;
131         
132
133 };
134 #endif
135