]> Creatis software - creaContours.git/blob - lib/kernel_ManagerContour_NDimensions/OutlineModelBuilder.h
Feature #1772 Add licence terms for all files.
[creaContours.git] / lib / kernel_ManagerContour_NDimensions / OutlineModelBuilder.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 #ifndef __OUTLINE_MODEL_BUILDER__
27 #define __OUTLINE_MODEL_BUILDER__
28
29
30 //------------------------------------------------------------------------------------------------------------
31 // Includes
32 //------------------------------------------------------------------------------------------------------------
33 #include <iostream>
34 #include <vector>
35 #include <string>
36
37
38 #include "ReaderEnvironment.h"
39 #include "SomeEnvironment.h"
40 #include "ContourThing.h"
41 #include "AxeThing.h"
42 #include "ImageSourceThing.h"
43 #include "ImageSectionThing.h"
44
45
46
47 class OutlineModelBuilder{
48
49 //------------------------------------------------------------------------------------------------------------
50 // Constructors & Destructors
51 //------------------------------------------------------------------------------------------------------------
52 public:
53
54         /**
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
61         */
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);
63
64         /**
65         * Destroys an AxeThing
66         */
67         ~OutlineModelBuilder();
68 //------------------------------------------------------------------------------------------------------------
69 // Methods
70 //------------------------------------------------------------------------------------------------------------
71
72         /**
73         * Gets the ImageSourceThing environment
74         *@param  ImSourceEnv 
75         */
76     SomeEnvironment<ImageSourceThing *> * getImSourceEnv();
77         /**
78         * Gets the ImageSectionThing environment
79         *@param  imSectionEnv 
80         */
81         SomeEnvironment<ImageSectionThing *> * getImSectionEnv();
82         /**
83         * Gets the AxeThing environment
84         *@param  AxesEnv
85         */
86         SomeEnvironment<AxeThing *> * getAxesEnv();
87         /**
88         * Gets the ContourThing environment
89         * @param  ContourEnv 
90         */
91         SomeEnvironment<ContourThing *> * getContourEnv();
92         
93         /**
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
97         */
98         void buildImageSource_Envornment( std::string sourcesFile, std::map<std::string, ImageSourceThing *> * sources );
99
100         /**
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
104         */
105         void buildImageSection_Envornment( std::string sectionsFile, std::map<std::string, ImageSectionThing *>* sections );
106
107         /**
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
111         */
112         void buildAxe_Envornment( std::string axesFile, std::map<std::string, AxeThing *>* axes );
113
114         /**
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
118         */
119         void buildCountour_Envornment( std::string outlinesFile, std::map<std::string, ContourThing *>* outlines );
120
121 private:
122 //------------------------------------------------------------------------------------------------------------
123 // Attributes
124 //------------------------------------------------------------------------------------------------------------
125         
126         /**
127         * Represents the environment builder based of reading files of axes
128         */
129         ReaderEnvironment<AxeThing *> *axesEnv_Reader;
130
131         /**
132         *  Represents the environment builder based of reading files of section images 
133         */
134         ReaderEnvironment<ImageSectionThing *> *imagesSectionEnv_Reader;
135
136         /**
137         * Represents the environment builder based of reading files of source images (Generally a complete volume data per image) 
138         */
139         ReaderEnvironment<ImageSourceThing *>  *imageSourceEnv_Reader;
140
141         /**
142         * Represents the environment builder based of reading files of outlines (outlines)
143         */
144         ReaderEnvironment<ContourThing *> * outlinesEnv_Reader;
145
146         /*
147         *
148         */
149         std::string conceptsFile;
150
151         std::string imagesSectionEnvOtherConceptsFN;
152
153         std::string outlinesEnvOtherConceptsFN;
154
155         std::string axesEnvOtherConceptsFN;
156         
157
158 };
159 #endif
160