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 162 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().

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

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 505 of file marParameters.cpp.

References _calcPercentage.

00505                                       {
00506         return _calcPercentage;
00507 }

int marParameters::getContourThresh (  ) 

Definition at line 461 of file marParameters.cpp.

References _contourThresh.

00461                                     {
00462         return _contourThresh;
00463 }

double marParameters::getDimIma (  ) 

Definition at line 114 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().

00115 {
00116         double scale = _doubleValues[ e_scale ];
00117         double roiDim = ( double )( _intValues[ e_roi_dimension ] );
00118     return( scale * roiDim );
00119 }

Here is the caller graph for this function:

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

Definition at line 129 of file marParameters.cpp.

References getDimIma(), and getSizeIma().

00130 {
00131     return( getDimIma( ) / ( double )( getSizeIma( ) ) );
00132 }

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 455 of file marParameters.cpp.

References _boolValues, and e_invest_slice_order.

Referenced by wxMaracasApp::SetVolumeData().

00455                                        {
00456   return _boolValues[ e_invest_slice_order ];
00457 }

Here is the caller graph for this function:

int marParameters::getLumenPercentage (  ) 

Definition at line 500 of file marParameters.cpp.

References _lumenPercentage.

00500                                            {
00501         return _lumenPercentage;
00502 }

double marParameters::getRadius (  ) 

Definition at line 476 of file marParameters.cpp.

References _radius.

00476                                 {
00477         return _radius;
00478 }

wxArrayString marParameters::getRelationalArray (  ) 

Definition at line 360 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().

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

Here is the caller graph for this function:

float marParameters::getRescaleIntercept (  ) 

Definition at line 150 of file marParameters.cpp.

References _doubleValues, and e_RescaleIntercept.

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

00150                                         {
00151         return (float) _doubleValues[ e_RescaleIntercept ];
00152 }

Here is the caller graph for this function:

float marParameters::getRescaleSlope (  ) 

Definition at line 146 of file marParameters.cpp.

References _doubleValues, and e_RescaleSlope.

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

00146                                     {
00147         return (float) _doubleValues[ e_RescaleSlope ];
00148 }

Here is the caller graph for this function:

int marParameters::getSizeIma (  ) 

Definition at line 122 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().

00123 {
00124     //  TODO : There should be a formal way to calculate a good image size.
00125     return( 128 ); 
00126 }

Here is the caller graph for this function:

double marParameters::getStandardDeviation (  ) 

Definition at line 471 of file marParameters.cpp.

References _standardDeviation.

00471                                            {
00472         return _standardDeviation;
00473 }

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

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

Definition at line 82 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().

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

Here is the caller graph for this function:

bool marParameters::load ( wxString &  nr  ) 

Definition at line 329 of file marParameters.cpp.

References load().

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

Here is the call graph for this function:

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

Definition at line 272 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().

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

Here is the caller graph for this function:

void marParameters::reset (  ) 

Persistence methods.

Definition at line 177 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().

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

Here is the caller graph for this function:

bool marParameters::save ( wxString &  nw  ) 

Definition at line 297 of file marParameters.cpp.

References save().

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

Here is the call graph for this function:

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

Definition at line 249 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().

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

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 495 of file marParameters.cpp.

References _calcPercentage.

Referenced by marExperimentCT::updateCalcPercentage().

00495                                                     {
00496         _calcPercentage = percentage;
00497 }

Here is the caller graph for this function:

void marParameters::setContourThresh ( int  thresh  ) 

Definition at line 466 of file marParameters.cpp.

References _contourThresh.

Referenced by marExperimentCT::updateDiscontinuityThreshold().

00466                                                  {
00467         _contourThresh = thresh;
00468 }

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 491 of file marParameters.cpp.

References _lumenPercentage.

Referenced by marExperimentCT::updateLumenPercentage().

00491                                                      {
00492         _lumenPercentage = percentage;
00493 }

Here is the caller graph for this function:

void marParameters::setRadius ( double  rad  ) 

Definition at line 486 of file marParameters.cpp.

References _radius.

00486                                           {
00487         _radius = rad;
00488 }

void marParameters::setRelationalArray ( wxArrayString &  arr  ) 

Definition at line 402 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().

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

Here is the caller graph for this function:

void marParameters::setRescaleIntercept ( float  intercept  ) 

Definition at line 158 of file marParameters.cpp.

References _doubleValues, and e_RescaleIntercept.

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

00158                                                       {
00159         _doubleValues[ e_RescaleIntercept ]= intercept;
00160 }

Here is the caller graph for this function:

void marParameters::setRescaleSlope ( float  slope  ) 

Definition at line 154 of file marParameters.cpp.

References _doubleValues, and e_RescaleSlope.

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

00154                                               {
00155         _doubleValues[ e_RescaleSlope ]= slope;
00156 }

Here is the caller graph for this function:

void marParameters::setROIStep ( double  width  ) 

Definition at line 135 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().

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

Here is the caller graph for this function:

void marParameters::setStandardDeviation ( double  dev  ) 

Definition at line 481 of file marParameters.cpp.

References _standardDeviation.

00481                                                      {
00482         _standardDeviation = dev;
00483 }

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 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1