marInterfaceCT.h

Go to the documentation of this file.
00001 /*=========================================================================
00002 
00003   Program:   wxMaracas
00004   Module:    $RCSfile: marInterfaceCT.h,v $
00005   Language:  C++
00006   Date:      $Date: 2009/05/14 13:55:08 $
00007   Version:   $Revision: 1.1 $
00008 
00009   Copyright: (c) 2002, 2003
00010   License:
00011   
00012      This software is distributed WITHOUT ANY WARRANTY; without even 
00013      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
00014      PURPOSE.  See the above copyright notice for more information.
00015 
00016 =========================================================================*/
00017 #ifndef __MAR__KERNEL__INTERFACECT__HXX__
00018 #define __MAR__KERNEL__INTERFACECT__HXX__
00019 
00020 //#include "marDicom.h"
00021 #include "marDicomBase.h"
00022 #include "marKVolume.h"
00023 #include "marExperimentCT.h"
00024 #include "marAxisCT.h"
00025 #include "marDynData.h"
00026 
00027 
00028 
00029 
00030 class MAR_KERNEL_EXPORT marInterfaceCT
00031 {
00032   public:
00033 
00034     marInterfaceCT( );
00035     ~marInterfaceCT( );
00036 
00037     bool loadParameters( std::string pFile );
00038     bool saveParameters( std::string pFile );
00039 
00040     bool loadParameters( ) {return loadParameters(m_paramFileName);}
00041     bool saveParameters( ) {return saveParameters(m_paramFileName);}
00042 
00043     bool initExperiment( );
00044 
00045     bool saveExperiment( std::string nFile );
00046 //    bool loadExperiment( wxString nFile );
00047     bool loadExperiment( std::string nFile );
00048 
00049     void reset( );
00050 
00051         void            SetParamFileName(std::string pFileName); 
00052         std::string GetParamFileName();
00053         void            SetDicom(marFilesBase *dicom);
00054         
00055         void appendAxis( marAxis* ax );
00056         marAxisCT* getAxis( int i = -1 ) ;
00057         void setAxis( int i );
00058 
00059         int   getQuantStart( );
00060         int   getQuantFinish( );
00061  
00062 
00063         void prepareQuantification( );
00064 
00065 
00066         vtkImageData*           getSliceImage( int i );
00067         vtkProbeFilter* get3DSlice( int i );
00068         double                  getTotalLength();
00069         double                  getSubAxisLength();
00070         double                  getReferenceArea();
00071         double                  getReferenceAverDiam();
00072         double                  getAverageArea(int pIni, int pEnd);
00073         int                             getNumberOfSlices( );
00074 
00075         marContour*             getContour( int point, int contour );
00076     vtkPoints*          get3Dcontour( int point, int contour );
00077     vtkPolyData*        get2Dcontour( int point, int contour );
00078     vtkPoints*          get2DDiameterMin( int point, int contour );
00079     vtkPoints*          get2DDiameterMax( int point, int contour );
00080 
00081         marParameters*  getParameters();
00082         marDynData*             getDynData();
00083 
00084         void getVOI( int* voi ) { _experiment->getVOI(voi); };
00085         void setVOI( int* voi ) { _experiment->setVOI(voi); };
00086         int getActualQuant( );
00087         int getHealthySlice( );
00088         int getHealthySliceStart( );
00089         int getHealthySliceEnd( );
00090         void setHealthySlice( int hsS, int hs, int hsE );
00091         void setActualQuant(int act);
00092 
00093         void replaceContour2D(int i,int size,double *vx,double *vy);
00094         void replaceContour2D(int size,double *vx,double *vy, int type);
00095         void cleanContours(int type);
00096         void EraseContour(int i);
00097 
00098         void ClearContours();
00099     void RegenerateAxis();
00100     void RegenerateSignal();
00101     void RecalculateAxis();
00102         void ClearContoursPartial(int start);
00103         
00104         void getMinMax( double& min, double& max );
00105 
00106         int getNumberOfContours(int point);
00107 
00108         void updateLumenPercentage(int percentage);
00109         void updateCalcPercentage(int percentage);
00110         void updateDiscontinuityThreshold(int percentage);
00111  
00112         marIsocontour* loadMarIsocontour(int size, double *vx, double *vy);
00113         double performXOR(int type, std::vector<marIsocontour*> manual);
00114         double performAND(int type, std::vector<marIsocontour*> manual);
00115         double performUnion(int type, std::vector<marIsocontour*> manual);
00116 
00117         void histogram(int point) ;
00118         
00119 
00120 
00121 
00122         int     getContourType(int point, int index);
00123         void                            setCalibration(bool calib);
00124         bool                            getCalibration();
00125         void                            setStartIndex(int start);
00126 
00127         int                                     getPointSize();
00128         marPoint*                       getPoint(int i);
00129         void                            markUpLumen(int point);
00130         void                            generateFile();
00131 
00132         marExperimentCT* GetExperiment();
00133 
00134     marFilesBase*               _dicom;
00135         marParameters*          _parameters;
00136         
00137 
00138 protected:
00139         std::string m_paramFileName;
00140 
00141 private:
00142         marExperimentCT*        _experiment;
00143 };
00144 
00145 #endif // __MAR__KERNEL__INTERFACECT__HXX__

Generated on 18 Mar 2010 for creaMaracasVisu_lib by  doxygen 1.6.1