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 # ------------------------------------------------------------------------ */
27 //----------------------------------------------------------------------------------------------------------------
28 // Class definition include
29 //----------------------------------------------------------------------------------------------------------------
30 #include "InstantMembersNameList.h"
32 //----------------------------------------------------------------------------------------------------------------
33 // Class implementation
34 //----------------------------------------------------------------------------------------------------------------
35 /** @file InstantMemberNameList.cxx */
37 //------------------------------------------------------------------------------------------------------------
38 // Constructors & Destructors
39 //------------------------------------------------------------------------------------------------------------
42 * Create the InstantMembersNameList with empty data pointers
44 InstantMembersNameList :: InstantMembersNameList()
46 actualAxeNamesWrapp = new NameWrapper("","");
47 actualSourceImageNamesWrapp = new NameWrapper("","");
48 actualSectionImageNamesWrapp = new NameWrapper("","");
49 actualOutlineNamesWrapp = new NameWrapper("","");
53 * Destroys the InstantMembersNameList
55 InstantMembersNameList :: ~InstantMembersNameList()
58 outlinesNamesVector.clear();
59 axesNamesVector.clear();
62 //------------------------------------------------------------------------------------------------------------
64 //------------------------------------------------------------------------------------------------------------
66 * Sets the actual outline names pair
67 * @param thekeyName The key name asigned to the actual outline
68 * @param theRealName The real name asigned to the actual outline
70 void InstantMembersNameList :: setActualOutline(std::string thekeyName, std::string theRealName )
72 actualOutlineNamesWrapp->setWrappingPair(thekeyName, theRealName);
76 * Sets the actual axes names pair
77 * @param thekeyName The key name asigned to the actual outline
78 * @param theRealName The real name asigned to the actual outline
80 void InstantMembersNameList :: addOutlineName(std::string thekeyName, std::string theRealName)
82 NameWrapper * outlineWrap = new NameWrapper (thekeyName, theRealName);
83 outlinesNamesVector.push_back(outlineWrap);
87 * Sets the actual axes names pair
88 * @param thekeyName The key name asigned to the actual axe
89 * @param theRealName The real name asigned to the actual axe
91 void InstantMembersNameList :: setActualAxeWrap(std::string thekeyName, std::string theRealName)
93 actualAxeNamesWrapp -> setWrappingPair(thekeyName, theRealName);
97 * Gets the actual axes key name
98 * @return actualAxeKeyName The key name asigned to the actual axe
100 std::string InstantMembersNameList :: getActualAxeKeyName()
102 return actualAxeNamesWrapp->getKeyName();
106 * Gets the actual axes key name
107 * @return actualSourceImageKeyName The key name asigned to the actual axe
109 std::string InstantMembersNameList :: getActualSourceImageKeyName()
111 return actualSourceImageNamesWrapp->getKeyName();
115 * Gets the actual axes key name
116 * @return actualSectionImageKeyName The key name asigned to the actual axe
118 std::string InstantMembersNameList :: getActualSectionImageKeyName()
120 return actualSourceImageNamesWrapp->getKeyName();
124 * Gets the vector of the key names of currect instant outlines
125 * @return vectorPairedNames The vector with the pair of outline names wrapping
127 std::vector<NameWrapper *> InstantMembersNameList :: getOutlinesNamesVector()
129 return outlinesNamesVector;
133 * Sets the actualSourceImage names pair
134 * @param thekeyName The key name asigned to the actual outline
135 * @param theRealName The real name asigned to the actual outline
137 void InstantMembersNameList :: setActualSourceImageNamesWrapp(std::string thekeyName, std::string theRealName)
139 actualSourceImageNamesWrapp = new NameWrapper(thekeyName,theRealName);
143 * Sets the actualSectionImage names pair
144 * @param thekeyName The key name asigned to the actual outline
145 * @param theRealName The real name asigned to the actual outline
147 void InstantMembersNameList :: setActualSectionImageNamesWrapp(std::string thekeyName, std::string theRealName)
149 actualSectionImageNamesWrapp = new NameWrapper(thekeyName,theRealName);
153 * Cleans the vector and the information of the instant members wrapping
155 void InstantMembersNameList :: clean()
159 if(!outlinesNamesVector.empty())
160 {while(outlinesNamesVector.size()>0)
161 outlinesNamesVector.pop_back();
163 if ( !axesNamesVector.empty())
165 while(axesNamesVector.size()>0)
166 axesNamesVector.pop_back();
169 outlinesNamesVector.clear();
170 axesNamesVector.clear();
172 delete actualAxeNamesWrapp;
173 delete actualSourceImageNamesWrapp;
174 delete actualSectionImageNamesWrapp;
175 delete actualOutlineNamesWrapp;*/