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 /*=========================================================================
29 Module: $RCSfile: marParameters.h,v $
31 Date: $Date: 2012/11/15 14:16:12 $
32 Version: $Revision: 1.5 $
34 Copyright: (c) 2002, 2003
37 This software is distributed WITHOUT ANY WARRANTY; without even
38 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
39 PURPOSE. See the above copyright notice for more information.
41 =========================================================================*/
42 #ifndef __MAR__KERNEL__PARAMETERS__HXX__
43 #define __MAR__KERNEL__PARAMETERS__HXX__
46 #include <wx/arrstr.h>
49 //using namespace std;
51 /** /def marParameters
52 * \brief Parameters class definition.
54 class creaMaracasVisu_EXPORT marParameters
59 * Some mnemonic enumerations for indexes or
64 VOX_TYPE_MINIMUM = 0x01,
65 VOX_TYPE_NORMAL = 0x02
75 enum QuantificationTypes
78 TYPE_PERIMETER = 0x02,
79 TYPE_DIAMETER_FROM_AREA = 0x04,
80 TYPE_DIAMETER_FROM_PERIMETER = 0x08,
81 TYPE_MINIMUM_DIAMETER = 0x10,
82 TYPE_MAXIMUM_DIAMETER = 0x20,
83 TYPE_AVERAGE_DIAMETER = 0x40
88 // PS -> e_debug_window_visible = 0 ,
89 // PS -> e_debug_console_visible ,
90 // PS -> e_calculate_mip_default ,
91 // PS -> e_choose_all_slices_default ,
95 e_invest_slice_order ,
96 // PS -> e_show_cell ,
97 // PS -> e_show_int_cell ,
100 enum DoubleParamIndexes
102 e_gravity_distance = 0 ,
103 e_axis_discret_step ,
104 e_distance_to_maximum_intensity ,
106 e_flexion_coeficient ,
107 e_tension_coeficient ,
108 e_voxel_x_dimension ,
109 e_voxel_y_dimension ,
110 e_voxel_z_dimension ,
112 // PS -> e_sampling ,
113 e_threshold_isocontour ,
114 e_threshold_snake_isocontour ,
118 // PS -> e_gradient_coeficient ,
119 // PS -> e_extern_coeficient ,
120 // PS -> e_ballon_coeficient ,
121 // PS -> e_back_color_3D_r ,
122 // PS -> e_back_color_3D_g ,
123 // PS -> e_back_color_3D_b ,
124 // PS -> e_axis_color_r ,
125 // PS -> e_axis_color_g ,
126 // PS -> e_axis_color_b ,
131 e_roi_dimension = 0 ,
137 e_number_of_points_for_snake ,
138 e_quantification_type ,
140 // PS -> e_number_of_iterations_snake_isocontour ,
141 // PS -> e_number_of_iterations_snake_deriche ,
143 // PS -> e_coef_cell_max_int ,
148 enum StringParamIndexes
150 e_installation_directory = 0 ,
151 e_dicom_images_directory ,
157 /** Default constructor.
159 marParameters( ) { reset( ); };
161 /** Default destructor.
165 /** Default analyzers & modificators.
167 * These methods use an index i, which should be one defined on
168 * correspondant type enum. For example, if you want to get the
169 * installation directory parameter you should write:
171 * marParameters* myParams = new marParameters( );
172 * std::string myDir = myParams->
174 * marParameters::e_installation_directory );
176 bool getBoolParam( int i ) { return( _boolValues[ i ] ); };
177 double getDoubleParam( int i ) { return( _doubleValues[ i ] ); };
178 int getIntParam( int i ) { return( _intValues[ i ] ); };
181 wxString& getStringParam( int i ) { return( _stringValues[ i ] );};
183 void setBoolParam( int i, bool p ) { _boolValues[ i ] = p; };
184 void setDoubleParam( int i, double p ) { _doubleValues[ i ] = p; };
185 void setIntParam( int i, int p ) { _intValues[ i ] = p; };
188 void setStringParam( int i, const wxString& p ) { _stringValues[ i ] = p; };
190 /** Special analizers & modifiers
191 * (in marKernel context, of course).
193 double getVoxelSize( );
196 double getImaRatio( );
197 float getRescaleSlope();
198 float getRescaleIntercept();
199 bool getInvestSliceOrder();
201 void setROIStep( double width );
202 void setRescaleSlope(float slope);
203 void setRescaleIntercept(float intercept);
208 void copyFrom( const marParameters& from );
210 /** Persistence methods.
213 bool save( std::ofstream& os );
214 bool load( std::ifstream& is );
215 bool save( wxString& nw );
216 bool load( wxString& nr );
218 wxArrayString getRelationalArray( );
219 void setRelationalArray( wxArrayString& arr );
221 //MAZV - Added for CT compatibility
222 int getContourThresh();
223 double getStandardDeviation();
225 int getLumenPercentage();
226 int getCalcPercentage();
228 void setContourThresh( int thresh );
229 void setStandardDeviation( double dev );
230 void setRadius( double rad );
231 void setLumenPercentage(int percentage);
232 void setCalcPercentage(int percentage);
233 //MAZV - End of addition
238 bool _boolValues[ ( int )e_bool_cont ];
239 double _doubleValues[ ( int )e_double_cont ];
240 int _intValues[ ( int )e_int_cont ];
243 wxString _stringValues[ ( int )e_string_cont ];
245 //MAZV Added fot CT compatibility
247 double _standardDeviation;
249 int _lumenPercentage;
251 //MAZV - End of addition
259 #endif // __MAR__KERNEL__PARAMETERS__HXX__
261 // eof - marParameters.h