]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/include/marInterfaceCT.h
4c129936b62b5dcf565505c3b0d904dd31cfe2d1
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / marInterfaceCT.h
1 /*=========================================================================
2
3   Program:   wxMaracas
4   Module:    $RCSfile: marInterfaceCT.h,v $
5   Language:  C++
6   Date:      $Date: 2009/05/14 13:55:08 $
7   Version:   $Revision: 1.1 $
8
9   Copyright: (c) 2002, 2003
10   License:
11   
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.
15
16 =========================================================================*/
17 #ifndef __MAR__KERNEL__INTERFACECT__HXX__
18 #define __MAR__KERNEL__INTERFACECT__HXX__
19
20 //#include "marDicom.h"
21 #include "marDicomBase.h"
22 #include "marKVolume.h"
23 #include "marExperimentCT.h"
24 #include "marAxisCT.h"
25 #include "marDynData.h"
26
27
28
29
30 class MAR_KERNEL_EXPORT marInterfaceCT
31 {
32   public:
33
34     marInterfaceCT( );
35     ~marInterfaceCT( );
36
37     bool loadParameters( std::string pFile );
38     bool saveParameters( std::string pFile );
39
40     bool loadParameters( ) {return loadParameters(m_paramFileName);}
41     bool saveParameters( ) {return saveParameters(m_paramFileName);}
42
43     bool initExperiment( );
44
45     bool saveExperiment( std::string nFile );
46 //    bool loadExperiment( wxString nFile );
47     bool loadExperiment( std::string nFile );
48
49     void reset( );
50
51         void            SetParamFileName(std::string pFileName); 
52         std::string GetParamFileName();
53         void            SetDicom(marFilesBase *dicom);
54         
55         void appendAxis( marAxis* ax );
56         marAxisCT* getAxis( int i = -1 ) ;
57         void setAxis( int i );
58
59         int   getQuantStart( );
60         int   getQuantFinish( );
61  
62
63         void prepareQuantification( );
64
65
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( );
74
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 );
80
81         marParameters*  getParameters();
82         marDynData*             getDynData();
83
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);
92
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);
97
98         void ClearContours();
99     void RegenerateAxis();
100     void RegenerateSignal();
101     void RecalculateAxis();
102         void ClearContoursPartial(int start);
103         
104         void getMinMax( double& min, double& max );
105
106         int getNumberOfContours(int point);
107
108         void updateLumenPercentage(int percentage);
109         void updateCalcPercentage(int percentage);
110         void updateDiscontinuityThreshold(int percentage);
111  
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);
116
117         void histogram(int point) ;
118         
119
120
121
122         int     getContourType(int point, int index);
123         void                            setCalibration(bool calib);
124         bool                            getCalibration();
125         void                            setStartIndex(int start);
126
127         int                                     getPointSize();
128         marPoint*                       getPoint(int i);
129         void                            markUpLumen(int point);
130         void                            generateFile();
131
132         marExperimentCT* GetExperiment();
133
134     marFilesBase*               _dicom;
135         marParameters*          _parameters;
136         
137
138 protected:
139         std::string m_paramFileName;
140
141 private:
142         marExperimentCT*        _experiment;
143 };
144
145 #endif // __MAR__KERNEL__INTERFACECT__HXX__