marParameters Class Reference

Parameters class definition. More...

#include <marParameters.h>

List of all members.

Public Types

enum  VoxelTypes { VOX_TYPE_MINIMUM = 0x01, VOX_TYPE_NORMAL = 0x02 }
enum  AlgorithmTypes { ISOCONTOURS = 1, SNAKE = 2, DERICHE = 3 }
enum  QuantificationTypes {
  TYPE_AREA = 0x01, TYPE_PERIMETER = 0x02, TYPE_DIAMETER_FROM_AREA = 0x04, TYPE_DIAMETER_FROM_PERIMETER = 0x08,
  TYPE_MINIMUM_DIAMETER = 0x10, TYPE_MAXIMUM_DIAMETER = 0x20, TYPE_AVERAGE_DIAMETER = 0x40
}
enum  BoolParamIndexes {
  e_debug_isocontour, e_debug_diameters, e_debug_fill_area, e_invest_slice_order,
  e_bool_cont
}
enum  DoubleParamIndexes {
  e_gravity_distance = 0, e_axis_discret_step, e_distance_to_maximum_intensity, e_cell_coeficient,
  e_flexion_coeficient, e_tension_coeficient, e_voxel_x_dimension, e_voxel_y_dimension,
  e_voxel_z_dimension, e_scale, e_threshold_isocontour, e_threshold_snake_isocontour,
  e_sigma, e_RescaleIntercept, e_RescaleSlope, e_double_cont
}
enum  IntParamIndexes {
  e_roi_dimension = 0, e_step, e_step_coeficient, e_mass_power,
  e_algorithm_type, e_mask_size, e_number_of_points_for_snake, e_quantification_type,
  e_stenosis_type, e_voxel_type, e_int_cont
}
enum  StringParamIndexes { e_installation_directory = 0, e_dicom_images_directory, e_string_cont }

Public Member Functions

 marParameters ()
 ~marParameters ()
bool getBoolParam (int i)
double getDoubleParam (int i)
int getIntParam (int i)
wxString & getStringParam (int i)
void setBoolParam (int i, bool p)
void setDoubleParam (int i, double p)
void setIntParam (int i, int p)
void setStringParam (int i, const wxString &p)
double getVoxelSize ()
double getDimIma ()
int getSizeIma ()
double getImaRatio ()
float getRescaleSlope ()
float getRescaleIntercept ()
bool getInvestSliceOrder ()
void setROIStep (double width)
void setRescaleSlope (float slope)
void setRescaleIntercept (float intercept)
void copyFrom (const marParameters &from)
void reset ()
bool save (std::ofstream &os)
bool load (std::ifstream &is)
bool save (wxString &nw)
bool load (wxString &nr)
wxArrayString getRelationalArray ()
void setRelationalArray (wxArrayString &arr)
int getContourThresh ()
double getStandardDeviation ()
double getRadius ()
int getLumenPercentage ()
int getCalcPercentage ()
void setContourThresh (int thresh)
void setStandardDeviation (double dev)
void setRadius (double rad)
void setLumenPercentage (int percentage)
void setCalcPercentage (int percentage)

Private Attributes

bool _boolValues [(int) e_bool_cont]
double _doubleValues [(int) e_double_cont]
int _intValues [(int) e_int_cont]
wxString _stringValues [(int) e_string_cont]
int _contourThresh
double _standardDeviation
double _radius
int _lumenPercentage
int _calcPercentage

Detailed Description

Parameters class definition.

/def marParameters

Definition at line 29 of file marParameters.h.


Member Enumeration Documentation

Enumerator:
ISOCONTOURS 
SNAKE 
DERICHE 

Definition at line 43 of file marParameters.h.

00044     {
00045             ISOCONTOURS = 1,
00046             SNAKE       = 2,
00047             DERICHE     = 3
00048 
00049     };

Enumerator:
e_debug_isocontour 
e_debug_diameters 
e_debug_fill_area 
e_invest_slice_order 
e_bool_cont 

Definition at line 61 of file marParameters.h.

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     };

Enumerator:
e_gravity_distance 
e_axis_discret_step 
e_distance_to_maximum_intensity 
e_cell_coeficient 
e_flexion_coeficient 
e_tension_coeficient 
e_voxel_x_dimension 
e_voxel_y_dimension 
e_voxel_z_dimension 
e_scale 
e_threshold_isocontour 
e_threshold_snake_isocontour 
e_sigma 
e_RescaleIntercept 
e_RescaleSlope 
e_double_cont 

Definition at line 75 of file marParameters.h.

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     };

Enumerator:
e_roi_dimension 
e_step 
e_step_coeficient 
e_mass_power 
e_algorithm_type 
e_mask_size 
e_number_of_points_for_snake 
e_quantification_type 
e_stenosis_type 
e_voxel_type 
e_int_cont 

Definition at line 104 of file marParameters.h.

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     };

Enumerator:
TYPE_AREA 
TYPE_PERIMETER 
TYPE_DIAMETER_FROM_AREA 
TYPE_DIAMETER_FROM_PERIMETER 
TYPE_MINIMUM_DIAMETER 
TYPE_MAXIMUM_DIAMETER 
TYPE_AVERAGE_DIAMETER 

Definition at line 50 of file marParameters.h.

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     };

Enumerator:
e_installation_directory 
e_dicom_images_directory 
e_string_cont 

Definition at line 123 of file marParameters.h.

00124      {
00125             e_installation_directory = 0 ,
00126             e_dicom_images_directory    ,
00127             e_string_cont
00128      };

/def Enumerations Some mnemonic enumerations for indexes or behaviour types.

Enumerator:
VOX_TYPE_MINIMUM 
VOX_TYPE_NORMAL 

Definition at line 37 of file marParameters.h.

00038     {
00039             VOX_TYPE_MINIMUM = 0x01,
00040             VOX_TYPE_NORMAL  = 0x02
00041 
00042     };


Constructor & Destructor Documentation

marParameters::marParameters (  )  [inline]

Default constructor.

Definition at line 134 of file marParameters.h.

00134 { reset( );  };

marParameters::~marParameters (  )  [inline]

Default destructor.

Definition at line 138 of file marParameters.h.

00138 {}


Member Function Documentation

void marParameters::copyFrom ( const marParameters from  ) 

Copy.

Definition at line 165 of file marParameters.cpp.

References _boolValues, _doubleValues, _intValues, _stringValues, e_bool_cont, e_double_cont, e_int_cont, and e_string_cont.

Referenced by wxProcessingCTWidget::OnExtract().

00166 {
00167     int i;
00168         
00169     memcpy( _boolValues, from._boolValues, e_bool_cont * sizeof( bool ) );
00170     memcpy( _intValues, from._intValues, e_int_cont * sizeof( int ) );
00171     memcpy( _doubleValues,
00172                 from._doubleValues,
00173                 e_double_cont * sizeof( double ) );
00174         
00175      for( i = 0; i < e_string_cont; i++ )
00176                 _stringValues[ i ] = from._stringValues[ i ];
00177 }

Here is the caller graph for this function:

bool marParameters::getBoolParam ( int  i  )  [inline]

Default analyzers & modificators.

These methods use an index i, which should be one defined on correspondant type enum. For example, if you want to get the installation directory parameter you should write:

marParameters* myParams = new marParameters( ); std::string myDir = myParams-> getStringParam( marParameters::e_installation_directory );

Definition at line 151 of file marParameters.h.

Referenced by wxSurfaceSTLWidget::ShowMARACASData().

00151 { return( _boolValues[ i ] );   };

Here is the caller graph for this function:

int marParameters::getCalcPercentage (  ) 

Definition at line 508 of file marParameters.cpp.

References _calcPercentage.

00508                                       {
00509         return _calcPercentage;
00510 }

int marParameters::getContourThresh (  ) 

Definition at line 464 of file marParameters.cpp.

References _contourThresh.

00464                                     {
00465         return _contourThresh;
00466 }

double marParameters::getDimIma (  ) 

Definition at line 117 of file marParameters.cpp.

References _doubleValues, _intValues, e_roi_dimension, and e_scale.

Referenced by marAxis::create2DDiameterMax(), marAxis::create2DDiameterMin(), marAxisCT::create2DDiametersMax(), marAxisCT::create2DDiametersMin(), marAxis::create3DSlice(), marAxis::createContour(), marAxisCT::createContours(), getImaRatio(), and vtk3DQuantSurfaceWidget::Set3DSliceActor().

00118 {
00119         double scale = _doubleValues[ e_scale ];
00120         double roiDim = ( double )( _intValues[ e_roi_dimension ] );
00121     return( scale * roiDim );
00122 }

Here is the caller graph for this function:

double marParameters::getDoubleParam ( int  i  )  [inline]
double marParameters::getImaRatio (  ) 

Definition at line 132 of file marParameters.cpp.

References getDimIma(), and getSizeIma().

00133 {
00134     return( getDimIma( ) / ( double )( getSizeIma( ) ) );
00135 }

Here is the call graph for this function:

int marParameters::getIntParam ( int  i  )  [inline]

Definition at line 153 of file marParameters.h.

Referenced by marExperiment::extractVascularTree(), and wxMaracasParametersDialog::Reset().

00153 { return( _intValues[ i ] );    };

Here is the caller graph for this function:

bool marParameters::getInvestSliceOrder (  ) 

Definition at line 458 of file marParameters.cpp.

References _boolValues, and e_invest_slice_order.

Referenced by wxMaracasApp::SetVolumeData().

00458                                        {
00459   return _boolValues[ e_invest_slice_order ];
00460 }

Here is the caller graph for this function:

int marParameters::getLumenPercentage (  ) 

Definition at line 503 of file marParameters.cpp.

References _lumenPercentage.

00503                                            {
00504         return _lumenPercentage;
00505 }

double marParameters::getRadius (  ) 

Definition at line 479 of file marParameters.cpp.

References _radius.

00479                                 {
00480         return _radius;
00481 }

wxArrayString marParameters::getRelationalArray (  ) 

Definition at line 363 of file marParameters.cpp.

References _boolValues, _doubleValues, _intValues, _stringValues, BoolParamNames, DoubleParamNames, e_bool_cont, e_double_cont, e_int_cont, e_string_cont, IntParamNames, and StringParamNames.

Referenced by params_dll().

00364 {
00365     // Allocate memory for pairs of data plus one end NULL array
00366         //    wxStringList ret;
00367     wxArrayString ret;
00368     wxString str;
00369     int i, j;
00370         
00371     for( i = 0, j = 0; i < e_bool_cont; i++, j += 2 ) {
00372                 
00373                 ret.Add( wxString( BoolParamNames[ i ], wxConvUTF8)  );
00374                 str.Printf( _T("%d"), ( _boolValues[ i ] )? 1: 0 );
00375                 ret.Add( str );
00376                 
00377     } // rof
00378     for( i = 0; i < e_double_cont; i++, j += 2 ) {
00379                 
00380                 ret.Add( wxString( DoubleParamNames[ i ], wxConvUTF8)  );
00381                 str.Printf( _T("%f"), _doubleValues[ i ] );
00382                 ret.Add( str );
00383                 
00384     } // rof
00385     for( i = 0; i < e_int_cont; i++, j += 2 ) {
00386                 
00387                 ret.Add( wxString( IntParamNames[ i ], wxConvUTF8) );
00388                 str.Printf( _T("%d"), _intValues[ i ] );
00389                 ret.Add( str );
00390                 
00391     } // rof
00392 
00393      for( i = 0; i < e_string_cont; i++, j += 2 ) {
00394                 ret.Add( wxString( StringParamNames[ i ], wxConvUTF8)  );
00395                 ret.Add( wxString( _stringValues[ i ].c_str( ), wxConvUTF8 ) );
00396      } // rof
00397 
00398 
00399     return( ret );
00400         
00401 }

Here is the caller graph for this function:

float marParameters::getRescaleIntercept (  ) 

Definition at line 153 of file marParameters.cpp.

References _doubleValues, and e_RescaleIntercept.

Referenced by marDynData::loadData(), wxMaracasImageBrowser02::OnBtSaveVOIData(), wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00153                                         {
00154         return (float) _doubleValues[ e_RescaleIntercept ];
00155 }

Here is the caller graph for this function:

float marParameters::getRescaleSlope (  ) 

Definition at line 149 of file marParameters.cpp.

References _doubleValues, and e_RescaleSlope.

Referenced by marDynData::loadData(), wxMaracasImageBrowser02::OnBtSaveVOIData(), wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00149                                     {
00150         return (float) _doubleValues[ e_RescaleSlope ];
00151 }

Here is the caller graph for this function:

int marParameters::getSizeIma (  ) 

Definition at line 125 of file marParameters.cpp.

Referenced by marAxis::create2Dcontour(), marAxis::create2DDiameterMax(), marAxis::create2DDiameterMin(), marAxisCT::create2DDiametersMax(), marAxisCT::create2DDiametersMin(), marAxis::create3DSlice(), marAxis::createContour(), marAxisCT::createContours(), marAxis::createSlice(), getImaRatio(), and vtk3DQuantSurfaceWidget::Set3DSliceActor().

00126 {
00127     //  TODO : There should be a formal way to calculate a good image size.
00128     return( 128 ); 
00129 }

Here is the caller graph for this function:

double marParameters::getStandardDeviation (  ) 

Definition at line 474 of file marParameters.cpp.

References _standardDeviation.

00474                                            {
00475         return _standardDeviation;
00476 }

wxString& marParameters::getStringParam ( int  i  )  [inline]
double marParameters::getVoxelSize (  ) 

Special analizers & modifiers (in marKernel context, of course).

Definition at line 85 of file marParameters.cpp.

References _doubleValues, _intValues, e_voxel_type, e_voxel_x_dimension, e_voxel_y_dimension, e_voxel_z_dimension, and VOX_TYPE_MINIMUM.

Referenced by wxSurfaceWidget::AddAxisActors(), wxSTLWidget_02::CreateViewPanel(), wxSTLWidget_03::CreateViewPanel(), marExperiment::extractVascularTree(), marDynData::getActualVoxel(), GetActualVoxelSize_dll(), marDynData::loadData(), and wxSurfaceWidget::OnManualAxis().

00086 {
00087 /* OLD CODE:
00088 
00089  double ret = 1.0;
00090  
00091   if( _intValues[ e_voxel_type ] == VOX_TYPE_MINIMUM ) {
00092   
00093    ret = _doubleValues[ e_voxel_x_dimension ];
00094    ret = GTM_MIN( _doubleValues[ e_voxel_y_dimension ], ret );
00095    ret = GTM_MIN( _doubleValues[ e_voxel_z_dimension ], ret );
00096    
00097     } // fi
00098     return( ret );
00099         */
00100 
00101 
00102 //EEDx1 
00103     double ret = 1.0;
00104     //Juan Carrillo 03/06/2005
00105         if( _intValues[ e_voxel_type ] == VOX_TYPE_MINIMUM ) {
00106                 
00107                 ret = _doubleValues[ e_voxel_x_dimension ];
00108                 ret = ( _doubleValues[ e_voxel_y_dimension ] < ret )?
00109                         _doubleValues[ e_voxel_y_dimension ]: ret;
00110                 ret = ( _doubleValues[ e_voxel_z_dimension ] < ret )?
00111                         _doubleValues[ e_voxel_z_dimension ]: ret;
00112     } // fi
00113     return( ret*1 );
00114 }

Here is the caller graph for this function:

bool marParameters::load ( wxString &  nr  ) 

Definition at line 332 of file marParameters.cpp.

References load().

00333 {
00334     std::ifstream is( (const char*)nr.mb_str( ),std::ios::binary|std::ios::in);
00335         
00336 //EEDxx2.4 DEBuG
00337 //      wxLogDebug("Laoding parameters from file " + nr);
00338     if( is==NULL ) 
00339         {
00340                 wxString errorMsg;
00341                 errorMsg= _T("Error : Cannot open file ")+nr+_T(" to load parameters");
00342 //EEDxx2.4 DEBuG
00343 //              wxLogDebug(errorMsg);
00344                 return( false );
00345         }
00346         if (load( is ))
00347         {
00348                 is.close( );
00349 //EEDxx2.4 DEBuG
00350 //              wxLogDebug("Parameters loaded from file " + nr);
00351                 return( true );
00352         }
00353         else
00354         {
00355                 is.close( );
00356 //EEDxx2.4 DEBuG
00357 //              wxLogDebug("Error : Cannot load parameters from file "+nr+": file may be corrupted");
00358                 return(false);
00359         }
00360 }

Here is the call graph for this function:

bool marParameters::load ( std::ifstream &  is  ) 

Definition at line 275 of file marParameters.cpp.

References _boolValues, _doubleValues, _intValues, _stringValues, e_bool_cont, e_double_cont, e_int_cont, and e_string_cont.

Referenced by load(), marInterfaceCT::loadExperiment(), marInterface::loadExperiment(), marInterfaceCT::loadParameters(), and marInterface::loadParameters().

00276 {
00277         int i, s;
00278         try
00279         {
00280                 is.read( ( char* )_boolValues, e_bool_cont * sizeof( bool ) );
00281                 is.read( ( char* )_intValues, e_int_cont * sizeof( int ) );
00282                 is.read( ( char* )_doubleValues, e_double_cont * sizeof( double ) );
00283                 for( i = 0; i < e_string_cont; i++ )
00284                 {
00285                         is.read( ( char* )&s, sizeof( int ) );
00286                         _stringValues[ i ].resize( s );
00287                         is.read( ( char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
00288                 } // rof
00289                 return( true ); 
00290         }
00291         catch (...)
00292         {
00293                 
00294                 return(false);
00295         }
00296         
00297 }

Here is the caller graph for this function:

void marParameters::reset (  ) 

Persistence methods.

Definition at line 180 of file marParameters.cpp.

References _boolValues, _calcPercentage, _contourThresh, _doubleValues, _intValues, _lumenPercentage, _radius, _standardDeviation, _stringValues, e_algorithm_type, e_axis_discret_step, e_cell_coeficient, e_debug_diameters, e_debug_fill_area, e_debug_isocontour, e_dicom_images_directory, e_distance_to_maximum_intensity, e_flexion_coeficient, e_gravity_distance, e_installation_directory, e_invest_slice_order, e_mask_size, e_mass_power, e_number_of_points_for_snake, e_quantification_type, e_RescaleIntercept, e_RescaleSlope, e_roi_dimension, e_scale, e_sigma, e_stenosis_type, e_step, e_step_coeficient, e_tension_coeficient, e_threshold_isocontour, e_threshold_snake_isocontour, e_voxel_type, e_voxel_x_dimension, e_voxel_y_dimension, e_voxel_z_dimension, ISOCONTOURS, TYPE_AREA, and VOX_TYPE_NORMAL.

Referenced by marInterfaceCT::loadExperiment(), marInterface::loadExperiment(), marInterfaceCT::loadParameters(), and marInterface::loadParameters().

00181 {
00182         // PS ->     _boolValues[ e_debug_window_visible ]      = false;
00183         // PS ->     _boolValues[ e_debug_console_visible ]     = false;
00184         // PS ->     _boolValues[ e_calculate_mip_default ]     = false;
00185         // PS ->     _boolValues[ e_choose_all_slices_default ] = true;
00186     _boolValues[ e_debug_isocontour ]          = true;
00187     _boolValues[ e_debug_diameters ]           = true;
00188     _boolValues[ e_debug_fill_area ]           = false;
00189     _boolValues[ e_invest_slice_order ]            = false;
00190         // PS ->     _boolValues[ e_show_cell ]                 = true;
00191         // PS ->     _boolValues[ e_show_int_cell ]             = true;
00192         
00193     _doubleValues[ e_gravity_distance ]              = 1.0;
00194     _doubleValues[ e_axis_discret_step ]             = 2.0;
00195     _doubleValues[ e_distance_to_maximum_intensity ] = 0.0;
00196     _doubleValues[ e_cell_coeficient ]               = 1.2;
00197     _doubleValues[ e_flexion_coeficient ]            = 0.1;
00198     _doubleValues[ e_tension_coeficient ]            = 0.3;
00199     _doubleValues[ e_voxel_x_dimension ]             = 1.0;
00200     _doubleValues[ e_voxel_y_dimension ]             = 1.0;
00201     _doubleValues[ e_voxel_z_dimension ]             = 1.0;
00202     _doubleValues[ e_scale ]                         = 4.0;
00203         // PS ->     _doubleValues[ e_sampling ]         = 4.0;
00204     _doubleValues[ e_threshold_isocontour ]          = 40.0;
00205     _doubleValues[ e_threshold_snake_isocontour ]    = 40.0;
00206     _doubleValues[ e_sigma ]                         = 0.1;
00207     _doubleValues[ e_RescaleIntercept ]              = 0;
00208     _doubleValues[ e_RescaleSlope ]                  = 1;
00209         // PS ->     _doubleValues[ e_extern_coeficient ]             = 0.3;
00210         // PS ->     _doubleValues[ e_gradient_coeficient ]           = 0.3;
00211         // PS ->     _doubleValues[ e_ballon_coeficient ]             = 0.02;
00212         // PS ->     _doubleValues[ e_back_color_3D_r ]               = 0.0;
00213         // PS ->     _doubleValues[ e_back_color_3D_g ]               = 0.0;
00214         // PS ->     _doubleValues[ e_back_color_3D_b ]               = 0.0;
00215         // PS ->     _doubleValues[ e_axis_color_r ]                  = 1.0;
00216         // PS ->     _doubleValues[ e_axis_color_g ]                  = 0.0;
00217         // PS ->     _doubleValues[ e_axis_color_b ]                  = 0.0;
00218         
00219         
00220     _intValues[ e_roi_dimension ]                         = 10;
00221     _intValues[ e_step ]                                  = 3;
00222     _intValues[ e_step_coeficient ]                       = 2;
00223     _intValues[ e_mass_power ]                            = 2;
00224     _intValues[ e_algorithm_type ]                        = ISOCONTOURS;
00225     _intValues[ e_mask_size ]                             = 5;
00226     _intValues[ e_number_of_points_for_snake ]            = 20;
00227     _intValues[ e_quantification_type ]                   = TYPE_AREA;
00228     _intValues[ e_stenosis_type ]                         = TYPE_AREA;
00229         // PS ->     _intValues[ e_number_of_iterations_snake_isocontour ] = 5;
00230         // PS ->     _intValues[ e_number_of_iterations_snake_deriche ]    = 700;
00231 
00232 
00233     _intValues[ e_voxel_type ]                            = VOX_TYPE_NORMAL;
00234 
00235 
00236         // PS ->     _intValues[ e_coef_cell_max_int ]                     = 2;
00237         
00238      _stringValues[ e_installation_directory ]  = _T("NO_DIRECTORY");
00239      _stringValues[ e_dicom_images_directory ] = _T("NO_DIRECTORY");
00240         
00241          //MAZV CT compatibility
00242         _contourThresh          = 10;
00243         _lumenPercentage        = 86;
00244         _calcPercentage         = 90;
00245         _standardDeviation      = 3;
00246         _radius                 = 3;
00247         //end MAZV CT compatibility
00248 
00249 }

Here is the caller graph for this function:

bool marParameters::save ( wxString &  nw  ) 

Definition at line 300 of file marParameters.cpp.

References save().

00301 {
00302     std::ofstream os( (const char*)nw.mb_str( ) ,std::ios::out |std::ios::binary );
00303         
00304 //EEDxx2.4 DEBuG
00305 //      wxLogDebug("Saving parameters to file " + nw);
00306         
00307     if( os==NULL ) 
00308         {
00309                 wxString errorMsg;
00310                 errorMsg= _T("Error : Cannot open file ")+nw+_T(" to save parameters");
00311 //EEDxx2.4 DEBuG
00312 //              wxLogDebug(errorMsg);
00313                 return( false );
00314         }
00315         if (save( os ))
00316         {
00317                 os.close( );
00318 //EEDxx2.4 DEBuG
00319 //              wxLogDebug("Parameters saved to file " + nw);
00320                 return( true );
00321         }
00322         else
00323         {
00324                 os.close( );
00325 //EEDxx2.4 DEBuG
00326 //              wxLogDebug("Error : Cannot save parameters to file "+nw);
00327                 return(false);
00328         }
00329 }

Here is the call graph for this function:

bool marParameters::save ( std::ofstream &  os  ) 

Definition at line 252 of file marParameters.cpp.

References _boolValues, _doubleValues, _intValues, _stringValues, e_bool_cont, e_double_cont, e_int_cont, and e_string_cont.

Referenced by save(), marInterfaceCT::saveExperiment(), marInterface::saveExperiment(), marInterfaceCT::saveParameters(), and marInterface::saveParameters().

00253 {
00254     int i, s;
00255         try 
00256         {
00257                 os.write( ( const char* )_boolValues, e_bool_cont * sizeof( bool ) );
00258                 os.write( ( char* )_intValues, e_int_cont * sizeof( int ) );
00259                 os.write( ( const char* )_doubleValues, e_double_cont * sizeof( double ) );
00260                 for( i = 0; i < e_string_cont; i++ ) {
00261                         s = _stringValues[ i ].length( );
00262                         os.write( ( const char* )&s, sizeof( int ) );
00263                         os.write( ( const char* )_stringValues[ i ].c_str( ), s * sizeof( char ) );
00264                 } // rof
00265                 return( true );
00266         }
00267         catch (...)
00268         {
00269                 return(false);
00270         }
00271     
00272 }

Here is the caller graph for this function:

void marParameters::setBoolParam ( int  i,
bool  p 
) [inline]

Definition at line 158 of file marParameters.h.

Referenced by wxSurfaceSTLWidget::OnInvertSliceOrder().

00158 { _boolValues[ i ] = p;     };

Here is the caller graph for this function:

void marParameters::setCalcPercentage ( int  percentage  ) 

Definition at line 498 of file marParameters.cpp.

References _calcPercentage.

Referenced by marExperimentCT::updateCalcPercentage().

00498                                                     {
00499         _calcPercentage = percentage;
00500 }

Here is the caller graph for this function:

void marParameters::setContourThresh ( int  thresh  ) 

Definition at line 469 of file marParameters.cpp.

References _contourThresh.

Referenced by marExperimentCT::updateDiscontinuityThreshold().

00469                                                  {
00470         _contourThresh = thresh;
00471 }

Here is the caller graph for this function:

void marParameters::setDoubleParam ( int  i,
double  p 
) [inline]
void marParameters::setIntParam ( int  i,
int  p 
) [inline]

Definition at line 160 of file marParameters.h.

Referenced by wxMaracasParametersDialog::Apply(), wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00160 { _intValues[ i ] = p;         };

Here is the caller graph for this function:

void marParameters::setLumenPercentage ( int  percentage  ) 

Definition at line 494 of file marParameters.cpp.

References _lumenPercentage.

Referenced by marExperimentCT::updateLumenPercentage().

00494                                                      {
00495         _lumenPercentage = percentage;
00496 }

Here is the caller graph for this function:

void marParameters::setRadius ( double  rad  ) 

Definition at line 489 of file marParameters.cpp.

References _radius.

00489                                           {
00490         _radius = rad;
00491 }

void marParameters::setRelationalArray ( wxArrayString &  arr  ) 

Definition at line 405 of file marParameters.cpp.

References _boolValues, _doubleValues, _intValues, _stringValues, BoolParamNames, DoubleParamNames, e_bool_cont, e_double_cont, e_int_cont, e_string_cont, IntParamNames, and StringParamNames.

Referenced by setParams_dll().

00406 {
00407         
00408     int i = 0, j;
00409     bool cont;
00410         
00411         //    while( arr[ i ] != NULL ) {
00412     while( !arr.IsEmpty() ) {
00413                 
00414                 cont = true;
00415                 for( j = 0; j < e_string_cont && cont; j++ ) {
00416                         if( strcmp( StringParamNames[ j ], (const char*)arr[ i ].mb_str() ) == 0 ) {
00417                                 _stringValues[ j ] = ( wxString )arr[ i + 1 ];
00418                                 cont = false;
00419                         } // fi
00420                 } // rof
00421                 for( j = 0; j < e_bool_cont && cont; j++ ) {
00422                         
00423                         if( strcmp( BoolParamNames[ j ], (const char*)arr[ i ].mb_str() ) == 0 ) {
00424                                 
00425                                 _boolValues[ j ] = ( strcmp( (const char*)arr[ i + 1 ].mb_str(), "1" ) == 0 );
00426                                 cont = false;
00427                                 
00428                         } // fi
00429                         
00430                 } // rof
00431                 for( j = 0; j < e_int_cont && cont; j++ ) {
00432                         
00433                         if( strcmp( IntParamNames[ j ], (const char*)arr[ i ].mb_str() ) == 0 ) {
00434                                 
00435                                 _intValues[ j ] = atoi( (const char*)arr[ i + 1 ].mb_str() );
00436                                 cont = false;
00437                                 
00438                         } // fi
00439                         
00440                 } // rof
00441                 for( j = 0; j < e_double_cont && cont; j++ ) {
00442                         
00443                         if( strcmp( DoubleParamNames[ j ], (const char*)arr[ i ].mb_str() ) == 0 ) {
00444                                 
00445                                 ( ( wxString )arr[ i + 1 ] ).ToDouble( &_doubleValues[ j ] );
00446                                 cont = false;
00447                                 
00448                         } // fi
00449                         
00450                 } // rof
00451                 i += 2;
00452                 
00453     } // fwhile
00454         
00455 }

Here is the caller graph for this function:

void marParameters::setRescaleIntercept ( float  intercept  ) 

Definition at line 161 of file marParameters.cpp.

References _doubleValues, and e_RescaleIntercept.

Referenced by wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00161                                                       {
00162         _doubleValues[ e_RescaleIntercept ]= intercept;
00163 }

Here is the caller graph for this function:

void marParameters::setRescaleSlope ( float  slope  ) 

Definition at line 157 of file marParameters.cpp.

References _doubleValues, and e_RescaleSlope.

Referenced by wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00157                                               {
00158         _doubleValues[ e_RescaleSlope ]= slope;
00159 }

Here is the caller graph for this function:

void marParameters::setROIStep ( double  width  ) 

Definition at line 138 of file marParameters.cpp.

References _doubleValues, _intValues, e_cell_coeficient, e_roi_dimension, e_step, and e_step_coeficient.

Referenced by vtk3DSurfaceWidget::SetInitialPoint(), and SetROIStep_dll().

00139 {
00140     _intValues[ e_roi_dimension ] =
00141                 ( int )ceil( _doubleValues[ e_cell_coeficient ] * width );
00142     _intValues[ e_step ] =
00143                 ( int )floor( ( double )_intValues[ e_roi_dimension ] /
00144                       ( double )_intValues[ e_step_coeficient ] );
00145 }

Here is the caller graph for this function:

void marParameters::setStandardDeviation ( double  dev  ) 

Definition at line 484 of file marParameters.cpp.

References _standardDeviation.

00484                                                      {
00485         _standardDeviation = dev;
00486 }

void marParameters::setStringParam ( int  i,
const wxString &  p 
) [inline]

Member Data Documentation

bool marParameters::_boolValues[(int) e_bool_cont] [private]

Definition at line 225 of file marParameters.h.

Referenced by getCalcPercentage(), reset(), and setCalcPercentage().

Definition at line 221 of file marParameters.h.

Referenced by getContourThresh(), reset(), and setContourThresh().

double marParameters::_doubleValues[(int) e_double_cont] [private]
int marParameters::_intValues[(int) e_int_cont] [private]

Definition at line 224 of file marParameters.h.

Referenced by getLumenPercentage(), reset(), and setLumenPercentage().

double marParameters::_radius [private]

Definition at line 223 of file marParameters.h.

Referenced by getRadius(), reset(), and setRadius().

Definition at line 222 of file marParameters.h.

Referenced by getStandardDeviation(), reset(), and setStandardDeviation().

wxString marParameters::_stringValues[(int) e_string_cont] [private]

Definition at line 218 of file marParameters.h.

Referenced by copyFrom(), getRelationalArray(), load(), reset(), save(), and setRelationalArray().


The documentation for this class was generated from the following files:

Generated on 20 Oct 2010 for creaMaracasVisu_lib by  doxygen 1.6.1