marExperiment Class Reference

#include <marExperiment.h>

Inheritance diagram for marExperiment:
Inheritance graph
[legend]
Collaboration diagram for marExperiment:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 marExperiment (marParameters *p=NULL)
 ~marExperiment ()
wxString & getDescription ()
void setDescription (wxString &d)
marDynDatagetDynData ()
void getVOI (int *voi)
void setVOI (int *voi)
void initExperiment (kVolume *volume)
void setStartPoint (int *sp)
void setStartPoint (int sx, int sy, int sz)
void extractVascularTree (int sens=1, double *vit=NULL, int cleanLevel=0)
void DeleteAxis (unsigned int index)
vtkPolyData * generateContour (int slice, int x, int y, std::vector< double * > *points)
void applyChangeResolution ()
int getNumberOfAxes ()
marAxisgetAxis (int i=-1)
void appendAxis (marAxis *ax)
void setAxis (int i)
int getQuantStart ()
int getQuantFinish ()
void backQuant ()
void prepareQuantification ()
marContour * getContour (int i)
vtkImageData * getSliceImage (int i)
vtkProbeFilter * get3DSlice (int i)
vtkPoints * get3Dcontour (int i)
vtkPolyData * get2Dcontour (int i)
vtkPoints * get2DDiameterMin (int i)
vtkPoints * get2DDiameterMax (int i)
double getTotalLength ()
double getSubAxisLength ()
double getReferenceArea ()
double getReferenceAverDiam ()
double getAverageArea (int pIni, int pEnd)
int getNumberOfSlices ()
void calculateAxesSignal ()
void prepareContourImages ()
void ClearContours ()
void RegenerateAxis ()
void RegenerateSignal ()
void RecalculateAxis ()
void reset ()
void copyFrom (const marObject &from)
bool save (std::ofstream &os)
bool load (std::ifstream &is)
void setParameters (marParameters *p)
void copyParameters (marParameters *p)
void makeACopyParameters ()
marParametersgetParameters ()
bool parametersOwned ()
virtual void copyFrom (const marObject &from)=0
bool save (std::string &nw)
bool load (std::string &nr)

Private Attributes

wxString _description
marDynData_dynData
int _voi [6]
int _startPoint [3]
std::vector< marAxis * > _axes

Detailed Description

Definition at line 26 of file marExperiment.h.


Constructor & Destructor Documentation

marExperiment::marExperiment ( marParameters p = NULL  ) 

Definition at line 24 of file marExperiment.cpp.

References _axes, _startPoint, and _voi.

00024                                                : marObject( p ),
00025                               _dynData( NULL ), _description( _T("NO DESCRIPTION") )
00026 {
00027   _voi[ 0 ] = _voi[ 1 ] = _voi[ 2 ] = 0;
00028   _voi[ 3 ] = _voi[ 4 ] = _voi[ 5 ] = 0;
00029   _startPoint[ 0 ] = _startPoint[ 1 ] = _startPoint[ 2 ] = 0;
00030   _axes.push_back( NULL );
00031 
00032 }

marExperiment::~marExperiment (  ) 

Definition at line 34 of file marExperiment.cpp.

References reset().

00034                                { 
00035         reset( ); 
00036 }

Here is the call graph for this function:


Member Function Documentation

void marExperiment::appendAxis ( marAxis ax  )  [inline]

Definition at line 68 of file marExperiment.h.

Referenced by marInterfaceCT::appendAxis(), and wxSurfaceWidget::OnManualAxis().

00069   {
00070     _axes.push_back( ax );
00071     _axes[ 0 ] = ax;
00072   }

Here is the caller graph for this function:

void marExperiment::applyChangeResolution (  ) 

Definition at line 197 of file marExperiment.cpp.

References _axes.

00198 {
00199   int i;
00200 
00201   for( i = 1; i < _axes.size( ); i++ )
00202     _axes[ i ]->changeAxisResolution( );
00203 }

void marExperiment::backQuant (  ) 

Definition at line 218 of file marExperiment.cpp.

References _axes.

00219 {
00220 //Cette méthode n'existe plus: dommage 
00221 //    if ( _axes[0]->getQuantOn() )
00222   {
00223     _axes[0]->setFinishQuant( _axes[0]->getFinishQuant() - 1);
00224     if ( _axes[0]->getFinishQuant() < 0 )
00225       _axes[0]->setFinishQuant(0);
00226   }
00227 }

void marExperiment::calculateAxesSignal (  ) 

Definition at line 251 of file marExperiment.cpp.

References _axes, _dynData, and marDynData::getVolume().

00252 {
00253   int i;
00254   for( i = 1; i < _axes.size( ); i++ )
00255     _axes[ i ]->calculateSignal( _dynData->getVolume( ) );
00256 }

Here is the call graph for this function:

void marExperiment::ClearContours (  ) 

Definition at line 366 of file marExperiment.cpp.

References marAxis::eraseContourVectorsContent(), and getAxis().

Referenced by wxMaracasQuantification::CleanContours(), and marInterfaceCT::ClearContours().

00366                                  {
00367         marAxis *maraxis = getAxis(); 
00368         if (maraxis!=NULL) maraxis->eraseContourVectorsContent();                        
00369 }

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void marObject::copyFrom ( const marObject from  )  [pure virtual, inherited]
void marExperiment::copyFrom ( const marObject from  ) 

Definition at line 266 of file marExperiment.cpp.

00267 { // TODO
00268 }

void marObject::copyParameters ( marParameters p  )  [inherited]

Definition at line 42 of file marObject.cpp.

References marObject::_parameters, and marObject::_parametersCopied.

00043 {
00044     if( _parametersCopied && _parameters != NULL ) delete _parameters;
00045     _parameters = new marParameters( );
00046     *_parameters = *p;
00047     _parametersCopied = true;
00048 }

void marExperiment::DeleteAxis ( unsigned int  index  ) 

Definition at line 325 of file marExperiment.cpp.

References _axes.

Referenced by wxSurfaceWidget::OnDeleteAxis(), and RegenerateAxis().

00326 {
00327         /* Very naughty bug, when doing a - 1, where a is uint result is still
00328         uint, imaging when a=0 :) need to cast to int*/
00329   
00330   int axesize=_axes.size( )-1;
00331   index=index+1;
00332   delete _axes[ index ];
00333   for( int i = index; i < axesize; i++ ) 
00334      _axes[ i ] = _axes[ i + 1 ];
00335   _axes.pop_back( );
00336 
00337   if (index<axesize) {
00338         _axes[ 0 ]=_axes[ index ];
00339   } else {
00340         _axes[ 0 ]=NULL;
00341   }
00342 
00343 /*  
00344   _axes[index]->Delete();
00345   if(_axes[ 0 ]) 
00346           _axes[ 0 ]->Delete( );
00347   _axes.erase(_axes.begin() + index);
00348 */
00349 
00350 // PS ->   // PS : traitement identique à la methode std::vector::erase(iterator)
00351 /*
00352   if(_axes[ 0 ]) 
00353           _axes[ 0 ]->Delete( );
00354   delete _axes[ index ];
00355 */
00356 }

Here is the caller graph for this function:

void marExperiment::extractVascularTree ( int  sens = 1,
double *  vit = NULL,
int  cleanLevel = 0 
)

Definition at line 72 of file marExperiment.cpp.

References _axes, _dynData, _startPoint, marAxis::addAxisPoint(), marAxis::calculateSignal(), marAxis::doSpline(), marParameters::e_distance_to_maximum_intensity, marParameters::e_flexion_coeficient, marParameters::e_gravity_distance, marParameters::e_mass_power, marParameters::e_roi_dimension, marParameters::e_step, marParameters::e_tension_coeficient, marParameters::getDoubleParam(), marParameters::getIntParam(), marObject::getParameters(), marAxis::getSignal(), marDynData::getVolume(), marParameters::getVoxelSize(), marAxis::INDX_count, marAxis::set_points_disc(), and marAxis::setDescription().

Referenced by TreeExtraction_MH_JFC::Execute(), ExtractAxes_dll(), wxProcessingCTWidget::OnExtract(), wxSurfaceWidget::OnExtractAxis(), and RegenerateAxis().

00073 {
00074 
00075   marAxis* tmpAxis;
00076   marAxis* tmpAxis2;
00077 
00078 #ifdef __LFV__GET__VASCULAR__TREE__
00079     PPPOINTAXE pts = NULL;
00080     PARBREVASCULAIRE res = NULL;
00081 #else
00082     PPPOINTAXE res = NULL;
00083     double pt[ marAxis::INDX_count ];
00084 #endif
00085     int n, i;
00086     res = ExtraireArbre(
00087       _startPoint[ 0 ],
00088       _startPoint[ 1 ],
00089       _startPoint[ 2 ],
00090       ( PPPVOLUME_USHORT )( _dynData->getVolume( )->castIdo( ) ),
00091       1, 1, 1,
00092       _dynData->getVolume( )->getXdim( ) - 1,
00093       _dynData->getVolume( )->getYdim( ) - 1,
00094       _dynData->getVolume( )->getZdim( ) - 1,
00095       ( double )( getParameters( )->getIntParam( marParameters::e_roi_dimension ) ),
00096       ( double )( getParameters( )->getIntParam( marParameters::e_step ) ),
00097       getParameters( )->getDoubleParam( marParameters::e_gravity_distance ),
00098       getParameters( )->getDoubleParam( marParameters::e_distance_to_maximum_intensity ),
00099       getParameters( )->getDoubleParam( marParameters::e_flexion_coeficient ),
00100       getParameters( )->getDoubleParam( marParameters::e_tension_coeficient ),
00101       getParameters( )->getIntParam( marParameters::e_mass_power ),
00102 #ifdef __LFV__GET__VASCULAR__TREE__
00103       pts,
00104 #else
00105       res,
00106 #endif
00107       &n , sens , vit);
00108 
00109     // Data treatment
00110 #ifdef __LFV__GET__VASCULAR__TREE__
00111     for( n = 0; n < res->nomAxes; n++ ) {
00112       tmp = new marAxis( getParameters( ) );
00113       tmp->set_points_disc( res->lstAxes[ n ] );
00114       for( i = 0; i < res->lstAxes[ n ]->nomPoints; i++ )
00115         tmp->AddAxisPoint( *( res->lstAxes[ n ]->lstPoints[ i ] ) );
00116       tmp->doSpline( );
00117       tmp->calculateSignal( _dynData->getVolume( ) );
00118       _axes.push_back( tmp );
00119     } // rof
00120 #else
00121         if (n>2){
00122                 //
00123                 double voxSize = this->getParameters( )->getVoxelSize( );
00124                 tmpAxis = new marAxis( this->getParameters( ) );
00125                 std::string desc = "Axis N.";
00126                 desc += _axes.size( );
00127                 tmpAxis->setDescription( desc );
00128                 tmpAxis->set_points_disc( res );
00129                 for( i = 0; i < n; i++ ) {
00130                         memcpy( pt, res[ i ], sizeof( POINTAXE ) );
00131                         pt[ 0 ] *= voxSize;
00132                         pt[ 1 ] *= voxSize;
00133                         pt[ 2 ] *= voxSize;
00134                         tmpAxis->addAxisPoint( pt );
00135                 }        // rof
00136                 tmpAxis->doSpline( );
00137                 tmpAxis->calculateSignal( _dynData->getVolume( ) );
00138 
00139                 //
00140                 int jCount=0;
00141                 tmpAxis2 = new marAxis( this->getParameters( ) );
00142                 tmpAxis2->setDescription( desc );
00143                 tmpAxis2->set_points_disc( res );       
00144                 for( i = 0; i < n; i++ ) {
00145                         if (tmpAxis->getSignal(i)>=cleanLevel ){
00146                                 jCount++;
00147                                 memcpy( pt, res[ i ], sizeof( POINTAXE ) );
00148                                 pt[ 0 ] *= voxSize;
00149                                 pt[ 1 ] *= voxSize;
00150                                 pt[ 2 ] *= voxSize;
00151                                 tmpAxis2->addAxisPoint( pt );
00152                         } else {
00153                                 i=n;
00154                         }
00155                 } // for 
00156                 delete tmpAxis;
00157 
00158                 if (jCount>2){
00159                         tmpAxis2->doSpline( );
00160                         tmpAxis2->calculateSignal( _dynData->getVolume( ) );
00161                         _axes.push_back( tmpAxis2 );
00162                         _axes[ 0 ] = tmpAxis2;
00163                 } else {
00164                         delete tmpAxis2;
00165                 }
00166     }
00167 #endif // __LFV__GET__VASCULAR__TREE__
00168 
00169 }

Here is the call graph for this function:

Here is the caller graph for this function:

vtkPolyData * marExperiment::generateContour ( int  slice,
int  x,
int  y,
std::vector< double * > *  points 
)

Definition at line 173 of file marExperiment.cpp.

00174 {
00175 /*  vtkImageData* imagedata;
00176 
00177   imagedata = getSliceImage( slice );
00178   vtkKitwareContourFilter* cntVTK = vtkKitwareContourFilter::New( );
00179   cntVTK->SetInput( imagedata );
00180   cntVTK->SetNumberOfContours( 1 );
00181   //cntVTK->SetValue( 0, vmin );
00182   cntVTK->SetValue( 0, 20 );
00183   //cntVTK->SetValue( 1, vmax );
00184   cntVTK->Update( );
00185 
00186     return cntVTK;*/
00187 
00188 //  return(_axes[ 0 ]->setContour( slice, x, y, points));
00189 
00190         return NULL;
00191         
00192   //return( _axes[ 0 ]->getContour( slice ) );
00193 }

vtkPolyData* marExperiment::get2Dcontour ( int  i  )  [inline]

Definition at line 89 of file marExperiment.h.

Referenced by wxQuantificationWidget::RefreshAxis().

00089 { return(_axes[0]->get2Dcontour         ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

vtkPoints* marExperiment::get2DDiameterMax ( int  i  )  [inline]

Definition at line 91 of file marExperiment.h.

Referenced by wxQuantificationWidget::RefreshAxis().

00091 { return(_axes[0]->get2DDiameterMax     ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

vtkPoints* marExperiment::get2DDiameterMin ( int  i  )  [inline]

Definition at line 90 of file marExperiment.h.

Referenced by wxQuantificationWidget::RefreshAxis().

00090 { return(_axes[0]->get2DDiameterMin     ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

vtkPoints* marExperiment::get3Dcontour ( int  i  )  [inline]

Definition at line 88 of file marExperiment.h.

Referenced by wxQuantificationWidget::OnContour_BT(), and wxQuantificationWidget::SetHealthySlice().

00088 { return(_axes[0]->get3Dcontour         ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

vtkProbeFilter* marExperiment::get3DSlice ( int  i  )  [inline]

Definition at line 87 of file marExperiment.h.

Referenced by marInterfaceCT::get3DSlice(), wxQuantificationWidget::RefreshAxis(), and vtk3DQuantSurfaceWidget::ShowMARACASDataAndAxe().

00087 { return(_axes[0]->get3DSlice           ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

double marExperiment::getAverageArea ( int  pIni,
int  pEnd 
) [inline]

Definition at line 97 of file marExperiment.h.

Referenced by wxQuantificationWidget::DetectHealthySickSlice(), and marInterfaceCT::getAverageArea().

00097 {return _axes[0]->getAverageArea(pIni,pEnd, _dynData->getVolume( ) );           };

Here is the caller graph for this function:

marAxis* marExperiment::getAxis ( int  i = -1  )  [inline]

Definition at line 63 of file marExperiment.h.

Referenced by wxSurfaceWidget::AddAxisActors(), wxQuantificationWidget::AddAxisActors(), wxSurfaceWidget::CallBackOnLeftDClick(), wxQuantificationWidget::CallBackOnLeftDClick(), marExperimentCT::cleanContours(), ClearContours(), marExperimentCT::ClearContoursPartial(), vtk3DSurfaceSTLWidget::ConvertMarAxisToPolyData(), marInterfaceCT::EraseContour(), TreeExtraction_MH_JFC::Execute(), wxSTLWidget_02::ExtractTree2_JF(), TreeExtraction_MH_JFC::FindVit(), marExperimentCT::generateFile(), marExperimentCT::get2Dcontour(), marExperimentCT::get2DDiameterMax(), marExperimentCT::get2DDiameterMin(), marExperimentCT::get3Dcontour(), GetActualAxis_dll(), GetActualAxisNumberOfPoints_dll(), GetActualAxisPoint_dll(), marInterfaceCT::getActualQuant(), GetAllAxes_dll(), marInterfaceCT::getAxis(), GetAxisLength_dll(), marExperimentCT::getCalibration(), marExperimentCT::getContour(), marExperimentCT::getContourType(), marInterfaceCT::getHealthySlice(), wxQuantificationWidget::GetHealthySlice(), marInterfaceCT::getHealthySliceEnd(), wxQuantificationWidget::GetHealthySliceRange(), marInterfaceCT::getHealthySliceStart(), marExperimentCT::getNumberOfContours(), marExperimentCT::getPoint(), marExperimentCT::getPointSize(), marExperimentCT::histogram(), marExperimentCT::loadMarIsocontour(), marExperimentCT::markUpLumen(), wxQuantificationWidgetCT::MoveSlider(), wxQuantificationWidget::MoveSlider(), wxProcessingCTWidget::OnExtract(), wxQuantificationWidget::OnHealthySlice_CB(), wxQuantificationWidget::OnSaveContours3D_BT(), wxEmptyPanelWidget_2::PaintVascularTree_MH_JFC(), marExperimentCT::performAND(), marExperimentCT::performUnion(), marExperimentCT::performXOR(), marExperimentCT::prepareQuantification(), marExperimentCT::RecalculateAxis(), RecalculateAxis(), wxQuantificationWidget::RefreshAxis(), marExperimentCT::RegenerateAxis(), RegenerateAxis(), RegenerateSignal(), marInterfaceCT::replaceContour2D(), marExperimentCT::replaceContour2D(), wxQuantificationWidget::ResetAxis(), vtk3DQuantSurfaceWidget::Set3DEndRegionSliceActor(), vtk3DQuantSurfaceWidget::Set3DHealthySliceActor(), vtk3DQuantSurfaceWidget::Set3DSliceActor(), vtk3DQuantSurfaceWidget::Set3DStartRegionSliceActor(), marInterfaceCT::setActualQuant(), marExperimentCT::setCalibration(), marInterfaceCT::setHealthySlice(), wxQuantificationWidget::SetHealthySlice(), wxQuantificationWidget::SetManualContour_AddPoint_2DWorld(), wxQuantificationWidget::SetManualContour_ReplaceContour(), marExperimentCT::setStartIndex(), wxQuantificationWidget::ShowMARACASData(), vtk3DSurfaceSTLWidget::ShowMARACASDataAndAxe(), vtk3DQuantSurfaceWidget::ShowMARACASDataAndAxe(), wxQuantificationWidget::showVariables(), marExperimentCT::updateCalcPercentage(), marExperimentCT::updateDiscontinuityThreshold(), marExperimentCT::updateLumenPercentage(), and wxEmptyPanelWidget_2::WriteSignals().

00064   { 
00065     return( _axes[ i + 1 ] ); 
00066   };

marContour* marExperiment::getContour ( int  i  )  [inline]

Definition at line 85 of file marExperiment.h.

Referenced by wxQuantificationWidget::GetStenosisArea(), wxQuantificationWidget::GetStenosisDiameter(), and wxQuantificationWidget::showVariables().

00085 { return(_axes[0]->getContour           ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

wxString& marExperiment::getDescription (  )  [inline]

Definition at line 34 of file marExperiment.h.

00034 { return( _description ); };

marDynData* marExperiment::getDynData (  )  [inline]

Definition at line 37 of file marExperiment.h.

Referenced by wxSTLWidget_02::ConfigureVTK(), wxPathologyWidget_01::ConfigureVTK(), wxEmptyPanelWidget_2::ConfigureVTK(), wxSTLWidget_03::ConfigureVTK(), wxSTLWidget_02::CreateViewPanel(), wxSTLWidget_03::CreateViewPanel(), TreeExtraction_MH_JFC::Execute(), wxEmptyPanelWidget_2::ExtractTree1_JF(), wxSTLWidget_02::ExtractTree2_JF(), wxEmptyPanelWidget_2::ExtractTree2_JF(), marExperimentCT::generateFile(), marExperimentCT::get2Dcontour(), marExperimentCT::get2DDiameterMax(), marExperimentCT::get2DDiameterMin(), marExperimentCT::get3Dcontour(), GetActualAxis_dll(), marExperimentCT::getContour(), marExperimentCT::getContourType(), marInterfaceCT::getDynData(), GetImageRange_dll(), marInterfaceCT::getMinMax(), marExperimentCT::getNumberOfContours(), GetVTKVolume_dll(), marExperimentCT::histogram(), TreeExtraction_MH_JFC::InitImagaDataResult(), marExperimentCT::markUpLumen(), wxPathologyWidget_01::OnBtnExtractPat(), wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC(), wxSurfaceWidget::OnExtractAxis(), wxSurfaceWidget::OnManualAxis(), marExperimentCT::performAND(), marExperimentCT::performUnion(), marExperimentCT::performXOR(), wxSurfaceWidget::ShowMARACASData(), wxSurfaceSTLWidget::ShowMARACASData(), wxQuantificationWidget::ShowMARACASData(), vtk3DSurfaceWidget::ShowMARACASData(), vtk3DSurfaceSTLWidget::ShowMARACASData(), marExperimentCT::updateCalcPercentage(), and marExperimentCT::updateLumenPercentage().

00037 { return( _dynData ); };

Here is the caller graph for this function:

int marExperiment::getNumberOfAxes (  )  [inline]

Definition at line 58 of file marExperiment.h.

Referenced by TreeExtraction_MH_JFC::Execute(), TreeExtraction_MH_JFC::FindVit(), GetAllAxes_dll(), GetNumberOfAxes_dll(), wxEmptyPanelWidget_2::PaintVascularTree_MH_JFC(), and wxEmptyPanelWidget_2::WriteSignals().

00059   {
00060     return( _axes.size( ) - 1 );
00061   };

Here is the caller graph for this function:

int marExperiment::getNumberOfSlices (  )  [inline]
marParameters* marObject::getParameters (  )  [inline, inherited]
int marExperiment::getQuantFinish (  )  [inline]

Definition at line 80 of file marExperiment.h.

Referenced by marInterfaceCT::getQuantFinish().

00080 { return _axes[0]->getFinishQuant( );};

Here is the caller graph for this function:

int marExperiment::getQuantStart (  )  [inline]

Definition at line 79 of file marExperiment.h.

Referenced by marInterfaceCT::getQuantStart().

00079 { return _axes[0]->getStartQuant( );};

Here is the caller graph for this function:

double marExperiment::getReferenceArea (  )  [inline]

Definition at line 94 of file marExperiment.h.

Referenced by marInterfaceCT::getReferenceArea(), wxQuantificationWidget::GetStenosisArea(), and wxQuantificationWidget::showVariables().

00094 { return _axes[0]->getReferenceArea( _dynData->getVolume( ));                   };

Here is the caller graph for this function:

double marExperiment::getReferenceAverDiam (  )  [inline]

Definition at line 95 of file marExperiment.h.

Referenced by marInterfaceCT::getReferenceAverDiam(), wxQuantificationWidget::GetStenosisDiameter(), and wxQuantificationWidget::showVariables().

00095 { return _axes[0]->getReferenceAverDiam( _dynData->getVolume( ));               };

Here is the caller graph for this function:

vtkImageData* marExperiment::getSliceImage ( int  i  )  [inline]

Definition at line 86 of file marExperiment.h.

Referenced by marInterfaceCT::getSliceImage(), wxQuantificationWidget::GetVolumeAxisExtended(), wxQuantificationWidget::RefreshAxis(), and wxQuantificationWidget::ShowMARACASData().

00086 { return(_axes[0]->getSliceImage        ( i ,  _dynData->getVolume( )  ));      };

Here is the caller graph for this function:

double marExperiment::getSubAxisLength (  )  [inline]

Definition at line 93 of file marExperiment.h.

Referenced by marInterfaceCT::getSubAxisLength(), and wxQuantificationWidget::showVariables().

00093 { return _axes[0]->getSubAxisLength() * _dynData->getActualVoxel();             };

Here is the caller graph for this function:

double marExperiment::getTotalLength (  )  [inline]

Definition at line 92 of file marExperiment.h.

Referenced by marInterfaceCT::getTotalLength(), and wxQuantificationWidget::showVariables().

00092 { return _axes[0]->getTotalLength() * _dynData->getActualVoxel() ;              };

Here is the caller graph for this function:

void marExperiment::getVOI ( int *  voi  )  [inline]

Definition at line 39 of file marExperiment.h.

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

00039 { memcpy( voi, _voi, sizeof( int ) * 6 ); };

Here is the caller graph for this function:

void marExperiment::initExperiment ( kVolume *  volume  ) 

Definition at line 39 of file marExperiment.cpp.

References _dynData, _voi, marObject::getParameters(), marDynData::loadData(), and reset().

Referenced by marInterfaceCT::initExperiment(), marInterface::initExperiment(), InitExperiment_dll(), wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC(), and wxProcessingCTWidget::OnExtract().

00040 {
00041   {
00042     reset( );
00043     _dynData = new marDynData( getParameters( ) );
00044 
00045      _dynData->loadData( volume, _voi );
00046 
00047 /* EED Borrame
00048 #ifndef DXMM
00049      _dynData->loadData( volume, _voi );
00050 #else
00051     _dynData->loadDataDXMM( volume, _voi );
00052 #endif
00053 */
00054   }
00055 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool marObject::load ( std::string &  nr  )  [inherited]

Definition at line 67 of file marObject.cpp.

References marObject::load().

Referenced by marObject::load().

00068 {
00069     std::ifstream is( nr.c_str( ) );
00070 
00071     if( is ) {
00072 
00073         load( is );
00074         is.close( );
00075         return( true );
00076 
00077     } // fi
00078 
00079     return( false );
00080 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool marExperiment::load ( std::ifstream &  is  )  [virtual]

Implements marObject.

Definition at line 290 of file marExperiment.cpp.

References _axes, _description, _dynData, _startPoint, _voi, marObject::getParameters(), marAxis::load(), marDynData::load(), and reset().

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

00291 {
00292 
00293   int i, n;
00294   char ttmp[ 5000 ];
00295   size_t st;
00296   marAxis* ax;
00297 
00298   reset( );
00299 
00300   is.read( ( char* )&st, sizeof( size_t ) );
00301   is.read( ( char* )ttmp, sizeof( char ) * st );
00302   ttmp[ st ] = '\0';
00303 
00304 // EED 05 join 2007
00305 // _description  = ttmp;
00306   _description   = wxString(ttmp, wxConvUTF8);
00307 
00308   is.read( ( char* )_startPoint, 3 * sizeof( int ) );
00309   is.read( ( char* )_voi, 6 * sizeof( int ) );
00310 
00311   _dynData = new marDynData( getParameters( ) );
00312   _dynData->load( is );
00313 
00314   is.read( ( char* )&n, sizeof( int ) );
00315   for( i = 1; i <= n; i++ ) {
00316     ax = new marAxis( getParameters( ) );
00317     ax->load( is );
00318     _axes.push_back( ax );
00319     _axes[ 0 ] = ax;
00320   } // rof
00321   return( true );
00322 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marObject::makeACopyParameters (  )  [inline, inherited]

Definition at line 48 of file marObject.h.

00049     {
00050             copyParameters( _parameters );
00051     }

bool marObject::parametersOwned (  )  [inline, inherited]

Definition at line 56 of file marObject.h.

00056 { return( _parametersCopied ); };

void marExperiment::prepareContourImages (  ) 

Definition at line 259 of file marExperiment.cpp.

References _axes, _dynData, and marDynData::getVolume().

00260 {
00261   if( _axes[ 0 ] )
00262     _axes[ 0 ]->sliceVolumeAxis( _dynData->getVolume( ) );
00263 }

Here is the call graph for this function:

void marExperiment::prepareQuantification (  ) 

Reimplemented in marExperimentCT.

Definition at line 206 of file marExperiment.cpp.

References _axes.

Referenced by wxQuantificationWidget::ShowMARACASData().

00207 {
00208 
00209 // EED borrame
00210 //  _axes[0]->sliceVolumeAxis( _dynData->getVolume( ), true);
00211 
00212   if( _axes[ 0 ] )
00213     _axes[ 0 ]->createEmptyVectors();
00214 
00215 }

Here is the caller graph for this function:

void marExperiment::RecalculateAxis (  ) 

Reimplemented in marExperimentCT.

Definition at line 382 of file marExperiment.cpp.

References marAxis::createEmptyVectors(), marAxis::doSpline(), getAxis(), marAxis::getNumberOfSplinePoints(), and marAxis::setActualQuant().

Referenced by wxMaracasQuantification::RegenerateAll(), and wxMaracas3DBrowser::RegenerateAll().

00382                                    {
00383         marAxis *maraxis = getAxis(); 
00384         if (maraxis!=NULL){
00385                 maraxis->doSpline();     
00386                 int nCnts = ( int ) maraxis->getNumberOfSplinePoints( );
00387                 getAxis()->setActualQuant(nCnts/2);
00388                 getAxis()->createEmptyVectors();                         
00389         }
00390 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marExperiment::RegenerateAxis (  ) 

Reimplemented in marExperimentCT.

Definition at line 371 of file marExperiment.cpp.

References marAxis::createEmptyVectors(), DeleteAxis(), extractVascularTree(), marAxis::getActualQuant(), getAxis(), marAxis::setActualQuant(), and setAxis().

Referenced by wxMaracasQuantification::RegenerateAll(), and wxMaracas3DBrowser::RegenerateAll().

00371                                   {
00372         if (getAxis()!=NULL){
00373                 int actualquant=getAxis()->getActualQuant();
00374                 DeleteAxis(0);                  
00375                 extractVascularTree();
00376                 setAxis(0);     
00377                 getAxis()->setActualQuant(actualquant);
00378                 getAxis()->createEmptyVectors();                         
00379         }
00380 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marExperiment::RegenerateSignal (  ) 

Definition at line 358 of file marExperiment.cpp.

References _dynData, marAxis::calculateSignal(), marAxis::eraseContourVectorsContent(), getAxis(), and marDynData::getVolume().

Referenced by marInterfaceCT::RegenerateSignal(), and wxMaracasQuantification::RegenerateSignal().

00358                                     {
00359         marAxis *maraxis = getAxis(); 
00360         if (maraxis!=NULL) {
00361                 maraxis->calculateSignal( _dynData->getVolume( ) );
00362                 maraxis->eraseContourVectorsContent();                   
00363         }
00364 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marExperiment::reset (  )  [virtual]

Virtual general methods (must be defined in each sub-class).

Implements marObject.

Definition at line 231 of file marExperiment.cpp.

References _axes, _description, and _dynData.

Referenced by marInterfaceCT::initExperiment(), marInterface::initExperiment(), initExperiment(), load(), marInterfaceCT::loadExperiment(), marInterface::loadExperiment(), and ~marExperiment().

00232 {
00233   int i;
00234 
00235   _description = _T("");
00236   if( _dynData != NULL ) delete _dynData;
00237     
00238  
00239   _dynData = NULL;
00240 
00241   for( i = 1; i < _axes.size( ); i++ ){
00242     if (_axes[ i ]!=NULL) delete _axes[ i ];
00243   }
00244 
00245   _axes.clear( );
00246   _axes.push_back( NULL );
00247 // PS ->   // PS Et les images ???? _quantificationImages
00248 }

Here is the caller graph for this function:

bool marObject::save ( std::string &  nw  )  [inherited]

Persistence methods

Definition at line 51 of file marObject.cpp.

References marObject::save().

00052 {
00053     std::ofstream os( nw.c_str( ) );
00054 
00055     if( os ) {
00056 
00057         save( os );
00058         os.close( );
00059         return( true );
00060 
00061     } // fi
00062 
00063     return( false );
00064 }

Here is the call graph for this function:

bool marExperiment::save ( std::ofstream &  os  )  [virtual]

Virtual persistence methods (must be defined in each sub-class).

Implements marObject.

Definition at line 271 of file marExperiment.cpp.

References _axes, _description, _dynData, _startPoint, _voi, and marDynData::save().

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

00272 {
00273   int i;
00274   size_t st;
00275 
00276   st = _description.length( );
00277   os.write( ( const char* )&st, sizeof( size_t ) );
00278   os.write( ( const char* )_description.c_str( ), sizeof( char ) * st );
00279   os.write( ( const char* )_startPoint, 3 * sizeof( int ) );
00280   os.write( ( const char* )_voi, 6 * sizeof( int ) );
00281   _dynData->save( os );
00282   i = _axes.size( ) - 1;
00283   os.write( ( const char* )&i, sizeof( int ) );
00284   for( i = 1; i < _axes.size( ); i++ )
00285     _axes[ i ]->save( os );
00286   return( true );
00287 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marExperiment::setAxis ( int  i  )  [inline]
void marExperiment::setDescription ( wxString &  d  )  [inline]

Definition at line 35 of file marExperiment.h.

00035 { _description = d; };

void marObject::setParameters ( marParameters p  )  [inherited]

Parameters assignation methods.

You can assign a marParameters object by reference (setParameters) or by value (copyParameters). Besides, if you want to make your actual reference to be by value, call makeACopyParameters.

Definition at line 34 of file marObject.cpp.

References marObject::_parameters, and marObject::_parametersCopied.

00035 {
00036     if( _parametersCopied && _parameters != NULL ) delete _parameters;
00037     _parameters = p;
00038     _parametersCopied = false;
00039 }

void marExperiment::setStartPoint ( int  sx,
int  sy,
int  sz 
)

Definition at line 58 of file marExperiment.cpp.

References _startPoint.

00059 {
00060 // EED 22 sep 2006
00061 //  _startPoint[ 0 ] = ( int )( ( double )sx * getParameters( )->getVoxelSize( ) );
00062 //  _startPoint[ 1 ] = ( int )( ( double )sy * getParameters( )->getVoxelSize( ) );
00063 //  _startPoint[ 2 ] = ( int )( ( double )sz * getParameters( )->getVoxelSize( ) );
00064 
00065   _startPoint[ 0 ] = sx;
00066   _startPoint[ 1 ] = sy;
00067   _startPoint[ 2 ] = sz;
00068 
00069 }

void marExperiment::setStartPoint ( int *  sp  )  [inline]
void marExperiment::setVOI ( int *  voi  )  [inline]

Definition at line 40 of file marExperiment.h.

Referenced by InitExperiment_dll(), wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC(), wxProcessingCTWidget::OnExtract(), wxMaracasFrame::OnStartExperiment(), wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

00040 { memcpy( _voi, voi, sizeof( int ) * 6 ); };

Here is the caller graph for this function:


Member Data Documentation

std::vector< marAxis* > marExperiment::_axes [private]
wxString marExperiment::_description [private]

Definition at line 118 of file marExperiment.h.

Referenced by load(), reset(), and save().

int marExperiment::_startPoint[3] [private]

Definition at line 121 of file marExperiment.h.

Referenced by extractVascularTree(), load(), marExperiment(), save(), and setStartPoint().

int marExperiment::_voi[6] [private]

Definition at line 120 of file marExperiment.h.

Referenced by initExperiment(), load(), marExperiment(), and save().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1