1 /*=========================================================================
4 Module: $RCSfile: marInterfaceCT.h,v $
6 Date: $Date: 2008/10/31 16:32:55 $
7 Version: $Revision: 1.1 $
9 Copyright: (c) 2002, 2003
12 This software is distributed WITHOUT ANY WARRANTY; without even
13 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
14 PURPOSE. See the above copyright notice for more information.
16 =========================================================================*/
17 #ifndef __MAR__KERNEL__INTERFACECT__HXX__
18 #define __MAR__KERNEL__INTERFACECT__HXX__
20 //#include "marDicom.h"
21 #include "marDicomBase.h"
22 #include "marKVolume.h"
23 #include "marExperimentCT.h"
24 #include "marAxisCT.h"
25 #include "marDynData.h"
30 class MAR_KERNEL_EXPORT marInterfaceCT
37 bool loadParameters( std::string pFile );
38 bool saveParameters( std::string pFile );
40 bool loadParameters( ) {return loadParameters(m_paramFileName);}
41 bool saveParameters( ) {return saveParameters(m_paramFileName);}
43 bool initExperiment( );
45 bool saveExperiment( std::string nFile );
46 // bool loadExperiment( wxString nFile );
47 bool loadExperiment( std::string nFile );
51 void SetParamFileName(std::string pFileName);
52 std::string GetParamFileName();
53 void SetDicom(marFilesBase *dicom);
55 void appendAxis( marAxis* ax );
56 marAxisCT* getAxis( int i = -1 ) ;
57 void setAxis( int i );
60 int getQuantFinish( );
63 void prepareQuantification( );
66 vtkImageData* getSliceImage( int i );
67 vtkProbeFilter* get3DSlice( int i );
68 double getTotalLength();
69 double getSubAxisLength();
70 double getReferenceArea();
71 double getReferenceAverDiam();
72 double getAverageArea(int pIni, int pEnd);
73 int getNumberOfSlices( );
75 marContour* getContour( int point, int contour );
76 vtkPoints* get3Dcontour( int point, int contour );
77 vtkPolyData* get2Dcontour( int point, int contour );
78 vtkPoints* get2DDiameterMin( int point, int contour );
79 vtkPoints* get2DDiameterMax( int point, int contour );
81 marParameters* getParameters();
82 marDynData* getDynData();
84 void getVOI( int* voi ) { _experiment->getVOI(voi); };
85 void setVOI( int* voi ) { _experiment->setVOI(voi); };
86 int getActualQuant( );
87 int getHealthySlice( );
88 int getHealthySliceStart( );
89 int getHealthySliceEnd( );
90 void setHealthySlice( int hsS, int hs, int hsE );
91 void setActualQuant(int act);
93 void replaceContour2D(int i,int size,double *vx,double *vy);
94 void replaceContour2D(int size,double *vx,double *vy, int type);
95 void cleanContours(int type);
96 void EraseContour(int i);
99 void RegenerateAxis();
100 void RegenerateSignal();
101 void RecalculateAxis();
102 void ClearContoursPartial(int start);
104 void getMinMax( double& min, double& max );
106 int getNumberOfContours(int point);
108 void updateLumenPercentage(int percentage);
109 void updateCalcPercentage(int percentage);
110 void updateDiscontinuityThreshold(int percentage);
112 marIsocontour* loadMarIsocontour(int size, double *vx, double *vy);
113 double performXOR(int type, std::vector<marIsocontour*> manual);
114 double performAND(int type, std::vector<marIsocontour*> manual);
115 double performUnion(int type, std::vector<marIsocontour*> manual);
117 void histogram(int point) ;
122 int getContourType(int point, int index);
123 void setCalibration(bool calib);
124 bool getCalibration();
125 void setStartIndex(int start);
128 marPoint* getPoint(int i);
129 void markUpLumen(int point);
132 marExperimentCT* GetExperiment();
134 marFilesBase* _dicom;
135 marParameters* _parameters;
139 std::string m_paramFileName;
142 marExperimentCT* _experiment;
145 #endif // __MAR__KERNEL__INTERFACECT__HXX__