marInterface Class Reference

#include <marInterface.h>

Collaboration diagram for marInterface:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 marInterface ()
 ~marInterface ()
bool loadParameters (std::string pFile)
bool saveParameters (std::string pFile)
bool loadParameters ()
bool saveParameters ()
bool initExperiment ()
bool saveExperiment (std::string nFile)
bool loadExperiment (std::string nFile)
void reset ()
void SetParamFileName (std::string pFileName)
std::string GetParamFileName ()
void SetDicom (marFilesBase *dicom)

Public Attributes

marFilesBase_dicom
marExperiment_experiment
marParameters_parameters

Protected Attributes

std::string m_paramFileName

Detailed Description

Definition at line 25 of file marInterface.h.


Constructor & Destructor Documentation

marInterface::marInterface (  ) 

Definition at line 30 of file marInterface.cpp.

References _experiment, _parameters, m_paramFileName, and MAR_DEFAULT_FILE_PARAMETERS.

00031 : _parameters( NULL ), _dicom( NULL ),
00032 _experiment( NULL )
00033 {
00034         m_paramFileName=MAR_DEFAULT_FILE_PARAMETERS;
00035     _parameters = new marParameters( );
00036 //EED    _dicom = new marGdcmDicom( _parameters );
00037     _experiment = new marExperiment( _parameters );
00038         
00039     // loadParameters( ); //PS !!! dangereux de faire des opérations d'E/S 
00040         // dans des constructeurs
00041 }

marInterface::~marInterface (  ) 

Definition at line 44 of file marInterface.cpp.

References reset().

00044                             {
00045     reset( );
00046 }

Here is the call graph for this function:


Member Function Documentation

std::string marInterface::GetParamFileName (  ) 

Definition at line 206 of file marInterface.cpp.

References m_paramFileName.

00207 { 
00208         return m_paramFileName;  
00209 }

bool marInterface::initExperiment (  ) 

Definition at line 121 of file marInterface.cpp.

References _dicom, _experiment, marFilesBase::getVolume(), marExperiment::initExperiment(), and marExperiment::reset().

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

00122 {
00123     _experiment->reset( );
00124     _experiment->initExperiment( _dicom->getVolume( ) );
00125     return( true );
00126         
00127 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool marInterface::loadExperiment ( std::string  nFile  ) 

Definition at line 158 of file marInterface.cpp.

References _dicom, _experiment, _parameters, marExperiment::load(), marObject::load(), marParameters::load(), marExperiment::reset(), marObject::reset(), and marParameters::reset().

Referenced by LoadExperiment_dll().

00159 {
00160         std::ifstream is( nFile.c_str( ) ,std::ios::binary|std::ios::in );
00161         
00162 //EEDxx2.4 DEBuG
00163 //      wxLogDebug(wxString("Loading experiment from file ") 
00164 //                      + wxString(nFile.c_str()));
00165         
00166         wxString errorMsg;
00167         errorMsg= wxString(_T("Cannot open file "))
00168                         + wxString(nFile.c_str(), wxConvUTF8)
00169                         + wxString(_T(" to load experiment"));
00170         
00171     if( is !=NULL) {
00172                 
00173         _parameters->reset( );
00174         _dicom->reset( );
00175         _experiment->reset( );
00176                 
00177         _parameters->load( is );
00178         _dicom->load( is );
00179         _experiment->load( is );
00180                 is.close( );
00181                 return( true );
00182                 
00183     } // fi
00184 //EEDxx2.4 DEBuG
00185 //      wxLogDebug(errorMsg);
00186     return( false );
00187 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool marInterface::loadParameters (  )  [inline]

Definition at line 35 of file marInterface.h.

References loadParameters().

Referenced by loadParameters().

Here is the call graph for this function:

Here is the caller graph for this function:

bool marInterface::loadParameters ( std::string  pFile  ) 

Definition at line 49 of file marInterface.cpp.

References _parameters, marParameters::load(), and marParameters::reset().

Referenced by wxMaracasApp::Initialize(), loadParams_dll(), and wxMaracasApp02::OnInit().

00050 {
00051         std::ifstream is( pFile.c_str( ),std::ios::binary|std::ios::in);
00052 
00053 //EEDxx2.4 DEBuG
00054 //      wxLogDebug(wxString("Loading parameters from file ") 
00055 //              + wxString(pFile.c_str()));
00056         
00057         if( is==NULL )
00058         {
00059                 wxString errorMsg;
00060                 errorMsg= wxString(_T("Error : Cannot open file "))
00061                                 + wxString( pFile.c_str(), wxConvUTF8 )
00062                                 + wxString(_T(" to load parameters"));
00063 //EEDxx2.4 DEBuG
00064 //              wxLogDebug(errorMsg);
00065                 return (false);
00066         }
00067         _parameters->reset( );
00068         if (_parameters->load( is ))
00069         {
00070                 is.close( );
00071                 return( true );
00072         }
00073         else
00074         {
00075                 is.close();
00076 //EEDxx2.4 DEBuG
00077 //              wxLogDebug(wxString("Error : Cannot load parameters from file ")
00078 //                              + wxString(pFile.c_str())
00079 //                              + wxString(": file may be corrupted"));
00080                 return (false);
00081         }
00082 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marInterface::reset (  ) 

Definition at line 190 of file marInterface.cpp.

References _dicom, _experiment, and _parameters.

Referenced by freeAllMaracasInterfaces_dll(), and ~marInterface().

00191 {
00192     if( _dicom          != NULL ) delete _dicom;
00193     if( _experiment != NULL ) delete _experiment;
00194     if( _parameters != NULL ) delete _parameters;
00195 
00196     _dicom              = NULL;
00197     _experiment = NULL;
00198     _parameters = NULL;
00199 }

Here is the caller graph for this function:

bool marInterface::saveExperiment ( std::string  nFile  ) 

Definition at line 129 of file marInterface.cpp.

References _dicom, _experiment, _parameters, marExperiment::save(), marObject::save(), and marParameters::save().

Referenced by SaveExperiment_dll().

00130 {
00131         std::ofstream os( nFile.c_str( ),std::ios::binary | std::ios::out );
00132         
00133 //EEDxx2.4 DEBuG
00134 //      wxLogDebug(wxString("Saving experiment to file ") 
00135 //                      + wxString(nFile.c_str()));
00136         
00137         wxString errorMsg;
00138         errorMsg= wxString(_T("Cannot open file "))
00139                         + wxString(nFile.c_str(), wxConvUTF8)
00140                         + wxString(_T(" to save experiment"));
00141 
00142         
00143     if( os !=NULL ) {
00144                 
00145         _parameters->save( os );
00146         _dicom->save( os );
00147         _experiment->save( os );
00148                 os.close( );
00149                 return( true );
00150                 
00151     } // fi
00152 //EEDxx2.4 DEBuG
00153 //      wxLogDebug(errorMsg);
00154     return( false );
00155 }

Here is the call graph for this function:

Here is the caller graph for this function:

bool marInterface::saveParameters (  )  [inline]

Definition at line 36 of file marInterface.h.

References saveParameters().

Referenced by saveParameters().

Here is the call graph for this function:

Here is the caller graph for this function:

bool marInterface::saveParameters ( std::string  pFile  ) 

Definition at line 85 of file marInterface.cpp.

References _parameters, and marParameters::save().

Referenced by wxMaracasParametersDialog::Apply(), wxMaracasApp::Initialize(), wxSTLWidget_02::OnBtnCreateFileSTL(), wxSTLWidget_03::OnBtnCreateFileSTL(), wxPathologyWidget_01::OnBtnFileSTL(), wxSTLWidget_02::OnBtnSTLFileLoad(), wxSTLWidget_03::OnBtnSTLFileLoad(), wxSurfaceSTLWidget::OnInvertSliceOrder(), and saveParams_dll().

00086 {
00087         std::ofstream os(pFile.c_str( ),std::ios::binary | std::ios::out);
00088         
00089 //EEDxx2.4 DEBuG
00090 //      wxLogDebug(wxString("Saving parameters to file ") 
00091 //                      + wxString(pFile.c_str()));
00092         
00093         
00094         if( os==NULL )
00095         {
00096                 wxString errorMsg;
00097                 errorMsg= wxString(_T("Error : Cannot open file "))
00098                                 + wxString(pFile.c_str(), wxConvUTF8)
00099                                 + wxString(_T(" to save parameters"));
00100 //EEDxx2.4 DEBuG
00101 //              wxLogDebug(errorMsg);
00102                 return( false );
00103         }
00104         if(_parameters->save( os ))
00105         {
00106                 os.close( );
00107                 return( true );
00108         }
00109         else
00110         {
00111                 os.close();
00112 //EEDxx2.4 DEBuG
00113 //              wxLogDebug(wxString("Error : Cannot save parameters to file ")
00114 //                              + wxString(pFile.c_str()));
00115                 return (false);
00116         }
00117 
00118 }

Here is the call graph for this function:

Here is the caller graph for this function:

void marInterface::SetDicom ( marFilesBase dicom  ) 

Definition at line 211 of file marInterface.cpp.

References _dicom.

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

00212 {
00213         _dicom=dicom;                            
00214 }

Here is the caller graph for this function:

void marInterface::SetParamFileName ( std::string  pFileName  ) 

Definition at line 201 of file marInterface.cpp.

References m_paramFileName.

Referenced by wxMaracasApp::Initialize(), and wxMaracasApp02::OnInit().

00202 { 
00203         m_paramFileName=pFileName; 
00204 }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 56 of file marInterface.h.

Referenced by wxSurfaceWidget::AddAxisActors(), wxQuantificationWidget::AddAxisActors(), wxSurfaceWidget::CallBackOnLeftDClick(), wxQuantificationWidget::CallBackOnLeftDClick(), wxQuantificationWidget::Clean3D(), wxMaracasQuantification::CleanContours(), wxSTLWidget_02::ConfigureVTK(), wxPathologyWidget_01::ConfigureVTK(), wxEmptyPanelWidget_2::ConfigureVTK(), wxSTLWidget_03::ConfigureVTK(), vtk3DSurfaceSTLWidget::ConvertMarAxisToPolyData(), wxSTLWidget_02::CreateViewPanel(), wxSTLWidget_03::CreateViewPanel(), wxQuantificationWidget::DetectHealthySickSlice(), ExtractAxes_dll(), wxEmptyPanelWidget_2::ExtractTree1_JF(), wxSTLWidget_02::ExtractTree2_JF(), wxEmptyPanelWidget_2::ExtractTree2_JF(), GetActualAxis_dll(), GetActualAxisNumberOfPoints_dll(), GetActualAxisPoint_dll(), GetAllAxes_dll(), GetAxisLength_dll(), wxQuantificationWidget::GetHealthySlice(), wxQuantificationWidget::GetHealthySliceRange(), GetImageRange_dll(), GetNumberOfAxes_dll(), wxQuantificationWidget::GetStenosisArea(), wxQuantificationWidget::GetStenosisDiameter(), wxQuantificationWidget::GetVolumeAxisExtended(), GetVTKVolume_dll(), initExperiment(), InitExperiment_dll(), loadExperiment(), marInterface(), wxQuantificationWidget::MoveSlider(), wxPathologyWidget_01::OnBtnExtractPat(), wxEmptyPanelWidget_2::OnBtnExtractTree_MH_JFC(), wxQuantificationWidget::OnCleanAll_BT(), wxQuantificationWidget::OnContour_BT(), wxSurfaceWidget::OnDeleteAxis(), wxSurfaceWidget::OnExtractAxis(), wxQuantificationWidget::OnHealthySlice_CB(), wxSurfaceWidget::OnManualAxis(), wxQuantificationWidget::OnSaveContours3D_BT(), wxMaracasFrame::OnStartExperiment(), wxQuantificationWidget::RefreshAxis(), wxMaracasQuantification::RegenerateAll(), wxMaracas3DBrowser::RegenerateAll(), wxMaracasQuantification::RegenerateSignal(), reset(), wxQuantificationWidget::Reset_sl_Slider(), wxQuantificationWidget::ResetAxis(), saveExperiment(), vtk3DQuantSurfaceWidget::Set3DEndRegionSliceActor(), vtk3DQuantSurfaceWidget::Set3DHealthySliceActor(), vtk3DQuantSurfaceWidget::Set3DSliceActor(), vtk3DQuantSurfaceWidget::Set3DStartRegionSliceActor(), wxQuantificationWidget::SetHealthySlice(), vtk3DSurfaceWidget::SetInitialPoint(), vtk3DSurfaceSTLWidget::SetInitialPoint(), wxQuantificationWidget::SetManualContour_AddPoint_2DWorld(), wxQuantificationWidget::SetManualContour_ReplaceContour(), SetStartPoint_dll(), wxSurfaceWidget::ShowMARACASData(), wxSurfaceSTLWidget::ShowMARACASData(), wxQuantificationWidget::ShowMARACASData(), vtk3DSurfaceWidget::ShowMARACASData(), vtk3DSurfaceSTLWidget::ShowMARACASData(), vtk3DSurfaceSTLWidget::ShowMARACASDataAndAxe(), vtk3DQuantSurfaceWidget::ShowMARACASDataAndAxe(), wxQuantificationWidget::showVariables(), wxSTLWidget_02::wxSTLWidget_02(), and wxSTLWidget_03::wxSTLWidget_03().

std::string marInterface::m_paramFileName [protected]

Definition at line 60 of file marInterface.h.

Referenced by GetParamFileName(), marInterface(), and SetParamFileName().


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

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1