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 __OTULINE_GROUP__
27 #define __OTULINE_GROUP__
30 //------------------------------------------------------------------------------------------------------------
32 //------------------------------------------------------------------------------------------------------------
38 //------------------------------------------------------------------------------------------------------------
39 // Constructors & Destructors
40 //------------------------------------------------------------------------------------------------------------
44 * Constructs an outline group with the given name
45 * @param theName Is the name for the group
46 * @param theGroupType Is the type for the group corresponding to one of the constants of this class
48 OutlineGroup(std::string theName, int theGroupType);
51 * Destroyes the outline and its dependencies
55 //------------------------------------------------------------------------------------------------------------
57 //------------------------------------------------------------------------------------------------------------
60 * Indicates if a given name of an outline is member of the group or not
61 * @param aKeyName Is the name of an outline to search for
63 bool isMemberOfGroup(std::string aKeyName);
66 * Removes an outline with the given name from the group
67 * @param theNameToRemove Is the name to remove from member name list
68 * @param allOcurrencies Indicates to errase all ocurrences
70 void removeOutline(std::string theNameToRemove, bool allOcurrencies = true);
73 * Adds an outline with the given name to the group members list
74 * @param theNameNw Is the name to add to the group
76 void addOutline(std::string theNameNw);
79 * Gets the name of the group
80 * @return name Is the name of the group
82 std::string getName();
85 * Sets the name of the group as the given one
86 * @param name Is the new name of the group
88 void setName(std::string theNwName);
91 * Gets the state of visiblility (true:visible) or not of the group
92 * @return visibleGroup Is the corresponding state
94 bool getIfVisibleGroup();
97 * Sets state of visible (true) or not of the with the given one
98 * @param theNwVisiblity Is the corresponding state
100 void setIfVisibleGroup(bool theNwVisiblity);
103 * Gets the state of static (true:static) or not of the group
104 * @return staticGroup Is the corresponding state
106 bool getIfStaticGroup();
109 * Sets state of static (true) or not of the with the given one
110 * @param theNwStatic Is the corresponding state
112 void setIfStaticGroup(bool theNwStatic);
115 * Gets the state of selection (true:selected) or not of the group
116 * @return selecetedGroup Is the corresponding state
118 bool getIfSelectedGroup();
121 * Sets state of visible (true) or not of the with the given one
122 * @param theNwSelected Is the corresponding state
124 void setIfSelectedGroup(bool theNwSelected);
127 * Gets the state of edition (true:editing) or not of the group
128 * @return editingGroup Is the corresponding state
130 bool getIfEditingGroup();
133 * Sets state of editing (true) or not of the with the given one
134 * @param theNwEditing Is the corresponding state
136 void setIfEditingGroup(bool theNwEditing);
139 * Gets the total count of outlines in the group
140 * @return totalCount Is the corresponding number of elements
145 * Sets the group type
146 * @param theType Is the corresponding new type to assign
148 void setGroupType(int theType);
151 * Gets the group type
152 * @return type Is the corresponding number of elements
154 int getOutlinesCount();
157 * Sets the total count of outlines in the group
158 * @param theNwVisiblity Is the corresponding state
160 void setIfEditingGroup(int theTotal);
163 * Adds an outline to the group as propagation type
164 * @param theOutlineKeyName Is the name used as identifier of the outline
166 void addOutline_PropagationType(std::string theOutlineKeyName);
169 * Adds an outline to the group as plane section type
170 * @param theOutlineKeyName Is the name used as identifier of the outline
172 void addOutline_PlaneSectionType(std::string theOutlineKeyName);
175 * Adds an outline to the group as overlaped type
176 * @param theOutlineKeyName Is the name used as identifier of the outline
178 void addOutline_OverlapedType(std::string theOutlineKeyName);
181 * Adds an outline to the group as strip type
182 * @param theOutlineKeyName Is the name used as identifier of the outline
184 void addOutline_StripType(std::string theOutlineKeyName);
187 * Adds an outline to the group as manual type
188 * @param theOutlineKeyName Is the name used as identifier of the outline
190 void addOutline_ManualType(std::string theOutlineKeyName);
194 * Gets the outlines of the group
195 * @return Returns the names of the outlines that belong to the group
197 std::vector< std::string > getGroupOutlinesNames ( );
199 //------------------------------------------------------------------------------------------------------------
201 //------------------------------------------------------------------------------------------------------------
205 bool acceptsRepetedOutlines;
208 * Represents the name of the group
213 * Represents the state of visible for the outlines in the group
218 * Represents the state of selection for the outlines in the group
223 * Represents the state of edition for the outlines in the group
228 * Represents the state of static for the outlines in the group
233 * Represents the type of the group
238 * Represents the total elements count of the group
243 * Represents the outlines of the group
245 std::vector< std::string > outlines_keyNames;
247 //------------------------------------------------------------------------------------------------------------
249 //------------------------------------------------------------------------------------------------------------