marParameters.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __MAR__KERNEL__PARAMETERS__HXX__
00018 #define __MAR__KERNEL__PARAMETERS__HXX__
00019
00020 #include "marTypes.h"
00021 #include <wx/arrstr.h>
00022 #include <wx/list.h>
00023 #include <fstream>
00024
00025
00029 class creaMaracasVisu_EXPORT marParameters
00030 {
00031 public:
00032
00037 enum VoxelTypes
00038 {
00039 VOX_TYPE_MINIMUM = 0x01,
00040 VOX_TYPE_NORMAL = 0x02
00041
00042 };
00043 enum AlgorithmTypes
00044 {
00045 ISOCONTOURS = 1,
00046 SNAKE = 2,
00047 DERICHE = 3
00048
00049 };
00050 enum QuantificationTypes
00051 {
00052 TYPE_AREA = 0x01,
00053 TYPE_PERIMETER = 0x02,
00054 TYPE_DIAMETER_FROM_AREA = 0x04,
00055 TYPE_DIAMETER_FROM_PERIMETER = 0x08,
00056 TYPE_MINIMUM_DIAMETER = 0x10,
00057 TYPE_MAXIMUM_DIAMETER = 0x20,
00058 TYPE_AVERAGE_DIAMETER = 0x40
00059
00060 };
00061 enum BoolParamIndexes
00062 {
00063
00064
00065
00066
00067 e_debug_isocontour ,
00068 e_debug_diameters ,
00069 e_debug_fill_area ,
00070 e_invest_slice_order ,
00071
00072
00073 e_bool_cont
00074 };
00075 enum DoubleParamIndexes
00076 {
00077 e_gravity_distance = 0 ,
00078 e_axis_discret_step ,
00079 e_distance_to_maximum_intensity ,
00080 e_cell_coeficient ,
00081 e_flexion_coeficient ,
00082 e_tension_coeficient ,
00083 e_voxel_x_dimension ,
00084 e_voxel_y_dimension ,
00085 e_voxel_z_dimension ,
00086 e_scale ,
00087
00088 e_threshold_isocontour ,
00089 e_threshold_snake_isocontour ,
00090 e_sigma ,
00091 e_RescaleIntercept ,
00092 e_RescaleSlope ,
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102 e_double_cont
00103 };
00104 enum IntParamIndexes
00105 {
00106 e_roi_dimension = 0 ,
00107 e_step ,
00108 e_step_coeficient ,
00109 e_mass_power ,
00110 e_algorithm_type ,
00111 e_mask_size ,
00112 e_number_of_points_for_snake ,
00113 e_quantification_type ,
00114 e_stenosis_type ,
00115
00116
00117 e_voxel_type ,
00118
00119 e_int_cont
00120 };
00121
00122
00123 enum StringParamIndexes
00124 {
00125 e_installation_directory = 0 ,
00126 e_dicom_images_directory ,
00127 e_string_cont
00128 };
00129
00130 public:
00131
00134 marParameters( ) { reset( ); };
00135
00138 ~marParameters( ) {}
00139
00151 bool getBoolParam( int i ) { return( _boolValues[ i ] ); };
00152 double getDoubleParam( int i ) { return( _doubleValues[ i ] ); };
00153 int getIntParam( int i ) { return( _intValues[ i ] ); };
00154
00155
00156 wxString& getStringParam( int i ) { return( _stringValues[ i ] );};
00157
00158 void setBoolParam( int i, bool p ) { _boolValues[ i ] = p; };
00159 void setDoubleParam( int i, double p ) { _doubleValues[ i ] = p; };
00160 void setIntParam( int i, int p ) { _intValues[ i ] = p; };
00161
00162
00163 void setStringParam( int i, const wxString& p ) { _stringValues[ i ] = p; };
00164
00168 double getVoxelSize( );
00169 double getDimIma( );
00170 int getSizeIma( );
00171 double getImaRatio( );
00172 float getRescaleSlope();
00173 float getRescaleIntercept();
00174 bool getInvestSliceOrder();
00175
00176 void setROIStep( double width );
00177 void setRescaleSlope(float slope);
00178 void setRescaleIntercept(float intercept);
00179
00180
00183 void copyFrom( const marParameters& from );
00184
00187 void reset( );
00188 bool save( std::ofstream& os );
00189 bool load( std::ifstream& is );
00190 bool save( wxString& nw );
00191 bool load( wxString& nr );
00192
00193 wxArrayString getRelationalArray( );
00194 void setRelationalArray( wxArrayString& arr );
00195
00196
00197 int getContourThresh();
00198 double getStandardDeviation();
00199 double getRadius();
00200 int getLumenPercentage();
00201 int getCalcPercentage();
00202
00203 void setContourThresh( int thresh );
00204 void setStandardDeviation( double dev );
00205 void setRadius( double rad );
00206 void setLumenPercentage(int percentage);
00207 void setCalcPercentage(int percentage);
00208
00209
00210
00211 private:
00212
00213 bool _boolValues[ ( int )e_bool_cont ];
00214 double _doubleValues[ ( int )e_double_cont ];
00215 int _intValues[ ( int )e_int_cont ];
00216
00217
00218 wxString _stringValues[ ( int )e_string_cont ];
00219
00220
00221 int _contourThresh;
00222 double _standardDeviation;
00223 double _radius;
00224 int _lumenPercentage;
00225 int _calcPercentage;
00226
00227
00228 };
00229
00230
00231
00232
00233
00234 #endif // __MAR__KERNEL__PARAMETERS__HXX__
00235
00236