marParameters.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: marParameters.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:54:43 $
00007   Version:   $Revision: 1.4 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011   
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notice for more information.
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 //using namespace std;
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 // PS ->            e_debug_window_visible = 0  ,
00064 // PS ->            e_debug_console_visible     ,
00065 // PS ->            e_calculate_mip_default     ,
00066 // PS ->            e_choose_all_slices_default ,
00067             e_debug_isocontour          ,
00068             e_debug_diameters           ,
00069             e_debug_fill_area           ,
00070             e_invest_slice_order        ,
00071 // PS ->            e_show_cell                 ,
00072 // PS ->            e_show_int_cell             ,
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 // PS ->            e_sampling                      ,
00088             e_threshold_isocontour          ,
00089             e_threshold_snake_isocontour    ,
00090             e_sigma                         ,
00091         e_RescaleIntercept              ,
00092         e_RescaleSlope                  ,
00093 // PS ->            e_gradient_coeficient           ,
00094 // PS ->            e_extern_coeficient             ,
00095 // PS ->            e_ballon_coeficient             ,
00096 // PS ->            e_back_color_3D_r               ,
00097 // PS ->            e_back_color_3D_g               ,
00098 // PS ->            e_back_color_3D_b               ,
00099 // PS ->            e_axis_color_r                  ,
00100 // PS ->            e_axis_color_g                  ,
00101 // PS ->            e_axis_color_b                  ,
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 // PS ->            e_number_of_iterations_snake_isocontour ,
00116 // PS ->            e_number_of_iterations_snake_deriche    ,
00117             e_voxel_type                            ,
00118 // PS ->            e_coef_cell_max_int                     ,
00119             e_int_cont
00120     };
00121 
00122 //EED
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 //EED
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 //EED
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         //MAZV - Added for CT compatibility
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         //MAZV - End of addition
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 // EED
00218         wxString _stringValues[ ( int )e_string_cont ];
00219 
00220         //MAZV Added fot CT compatibility
00221         int     _contourThresh;
00222         double  _standardDeviation;
00223         double  _radius;
00224         int _lumenPercentage;
00225         int _calcPercentage;
00226         //MAZV - End of addition
00227 
00228 };
00229 
00230 
00231         
00232         
00233 
00234 #endif // __MAR__KERNEL__PARAMETERS__HXX__
00235 
00236 // eof - marParameters.h

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1