1 /*=========================================================================
4 Module: $RCSfile: marParameters.h,v $
6 Date: $Date: 2009/01/15 11:09:47 $
7 Version: $Revision: 1.3 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
17 #ifndef __MAR__KERNEL__PARAMETERS__HXX__
18 #define __MAR__KERNEL__PARAMETERS__HXX__
21 #include <wx/arrstr.h>
24 //using namespace std;
26 /** /def marParameters
27 * \brief Parameters class definition.
29 class creaMaracasVisu_EXPORT marParameters
34 * Some mnemonic enumerations for indexes or
39 VOX_TYPE_MINIMUM = 0x01,
40 VOX_TYPE_NORMAL = 0x02
50 enum QuantificationTypes
53 TYPE_PERIMETER = 0x02,
54 TYPE_DIAMETER_FROM_AREA = 0x04,
55 TYPE_DIAMETER_FROM_PERIMETER = 0x08,
56 TYPE_MINIMUM_DIAMETER = 0x10,
57 TYPE_MAXIMUM_DIAMETER = 0x20,
58 TYPE_AVERAGE_DIAMETER = 0x40
63 // PS -> e_debug_window_visible = 0 ,
64 // PS -> e_debug_console_visible ,
65 // PS -> e_calculate_mip_default ,
66 // PS -> e_choose_all_slices_default ,
70 e_invest_slice_order ,
71 // PS -> e_show_cell ,
72 // PS -> e_show_int_cell ,
75 enum DoubleParamIndexes
77 e_gravity_distance = 0 ,
79 e_distance_to_maximum_intensity ,
81 e_flexion_coeficient ,
82 e_tension_coeficient ,
88 e_threshold_isocontour ,
89 e_threshold_snake_isocontour ,
93 // PS -> e_gradient_coeficient ,
94 // PS -> e_extern_coeficient ,
95 // PS -> e_ballon_coeficient ,
96 // PS -> e_back_color_3D_r ,
97 // PS -> e_back_color_3D_g ,
98 // PS -> e_back_color_3D_b ,
99 // PS -> e_axis_color_r ,
100 // PS -> e_axis_color_g ,
101 // PS -> e_axis_color_b ,
106 e_roi_dimension = 0 ,
112 e_number_of_points_for_snake ,
113 e_quantification_type ,
115 // PS -> e_number_of_iterations_snake_isocontour ,
116 // PS -> e_number_of_iterations_snake_deriche ,
118 // PS -> e_coef_cell_max_int ,
123 enum StringParamIndexes
125 e_installation_directory = 0 ,
126 e_dicom_images_directory ,
132 /** Default constructor.
134 marParameters( ) { reset( ); };
136 /** Default destructor.
140 /** Default analyzers & modificators.
142 * These methods use an index i, which should be one defined on
143 * correspondant type enum. For example, if you want to get the
144 * installation directory parameter you should write:
146 * marParameters* myParams = new marParameters( );
147 * std::string myDir = myParams->
149 * marParameters::e_installation_directory );
151 bool getBoolParam( int i ) { return( _boolValues[ i ] ); };
152 double getDoubleParam( int i ) { return( _doubleValues[ i ] ); };
153 int getIntParam( int i ) { return( _intValues[ i ] ); };
156 wxString& getStringParam( int i ) { return( _stringValues[ i ] );};
158 void setBoolParam( int i, bool p ) { _boolValues[ i ] = p; };
159 void setDoubleParam( int i, double p ) { _doubleValues[ i ] = p; };
160 void setIntParam( int i, int p ) { _intValues[ i ] = p; };
163 void setStringParam( int i, const wxString& p ) { _stringValues[ i ] = p; };
165 /** Special analizers & modifiers
166 * (in marKernel context, of course).
168 double getVoxelSize( );
171 double getImaRatio( );
172 float getRescaleSlope();
173 float getRescaleIntercept();
174 bool getInvestSliceOrder();
176 void setROIStep( double width );
177 void setRescaleSlope(float slope);
178 void setRescaleIntercept(float intercept);
183 void copyFrom( const marParameters& from );
185 /** Persistence methods.
188 bool save( std::ofstream& os );
189 bool load( std::ifstream& is );
190 bool save( wxString& nw );
191 bool load( wxString& nr );
193 wxArrayString getRelationalArray( );
194 void setRelationalArray( wxArrayString& arr );
196 //MAZV - Added for CT compatibility
197 int getContourThresh();
198 double getStandardDeviation();
200 int getLumenPercentage();
201 int getCalcPercentage();
203 void setContourThresh( int thresh );
204 void setStandardDeviation( double dev );
205 void setRadius( double rad );
206 void setLumenPercentage(int percentage);
207 void setCalcPercentage(int percentage);
208 //MAZV - End of addition
213 bool _boolValues[ ( int )e_bool_cont ];
214 double _doubleValues[ ( int )e_double_cont ];
215 int _intValues[ ( int )e_int_cont ];
218 wxString _stringValues[ ( int )e_string_cont ];
220 //MAZV Added fot CT compatibility
222 double _standardDeviation;
224 int _lumenPercentage;
226 //MAZV - End of addition
234 #endif // __MAR__KERNEL__PARAMETERS__HXX__
236 // eof - marParameters.h