1 /*# ---------------------------------------------------------------------
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
5 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
6 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
7 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
9 # This software is governed by the CeCILL-B license under French law and
10 # abiding by the rules of distribution of free software. You can use,
11 # modify and/ or redistribute the software under the terms of the CeCILL-B
12 # license as circulated by CEA, CNRS and INRIA at the following URL
13 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
14 # or in the file LICENSE.txt.
16 # As a counterpart to the access to the source code and rights to copy,
17 # modify and redistribute granted by the license, users are provided only
18 # with a limited warranty and the software's author, the holder of the
19 # economic rights, and the successive licensors have only limited
22 # The fact that you are presently reading this means that you have had
23 # knowledge of the CeCILL-B license and that you accept its terms.
24 # ------------------------------------------------------------------------ */
26 /*# ---------------------------------------------------------------------
28 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
30 # Authors : Eduardo Davila, Frederic Cervenansky, Claire Mouton
31 # Previous Authors : Laurent Guigues, Jean-Pierre Roux
32 # CreaTools website : www.creatis.insa-lyon.fr/site/fr/creatools_accueil
34 # This software is governed by the CeCILL-B license under French law and
35 # abiding by the rules of distribution of free software. You can use,
36 # modify and/ or redistribute the software under the terms of the CeCILL-B
37 # license as circulated by CEA, CNRS and INRIA at the following URL
38 # http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
39 # or in the file LICENSE.txt.
41 # As a counterpart to the access to the source code and rights to copy,
42 # modify and redistribute granted by the license, users are provided only
43 # with a limited warranty and the software's author, the holder of the
44 # economic rights, and the successive licensors have only limited
47 # The fact that you are presently reading this means that you have had
48 # knowledge of the CeCILL-B license and that you accept its terms.
49 # ------------------------------------------------------------------------ */
51 /*=========================================================================
54 Module: $RCSfile: marInterfaceCT.h,v $
56 Date: $Date: 2012/11/15 14:15:31 $
57 Version: $Revision: 1.2 $
59 Copyright: (c) 2002, 2003
62 This software is distributed WITHOUT ANY WARRANTY; without even
63 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
64 PURPOSE. See the above copyright notice for more information.
66 =========================================================================*/
67 #ifndef __MAR__KERNEL__INTERFACECT__HXX__
68 #define __MAR__KERNEL__INTERFACECT__HXX__
70 //#include "marDicom.h"
71 #include "marDicomBase.h"
72 #include "marKVolume.h"
73 #include "marExperimentCT.h"
74 #include "marAxisCT.h"
75 #include "marDynData.h"
80 class MAR_KERNEL_EXPORT marInterfaceCT
87 bool loadParameters( std::string pFile );
88 bool saveParameters( std::string pFile );
90 bool loadParameters( ) {return loadParameters(m_paramFileName);}
91 bool saveParameters( ) {return saveParameters(m_paramFileName);}
93 bool initExperiment( );
95 bool saveExperiment( std::string nFile );
96 // bool loadExperiment( wxString nFile );
97 bool loadExperiment( std::string nFile );
101 void SetParamFileName(std::string pFileName);
102 std::string GetParamFileName();
103 void SetDicom(marFilesBase *dicom);
105 void appendAxis( marAxis* ax );
106 marAxisCT* getAxis( int i = -1 ) ;
107 void setAxis( int i );
109 int getQuantStart( );
110 int getQuantFinish( );
113 void prepareQuantification( );
116 vtkImageData* getSliceImage( int i );
117 vtkProbeFilter* get3DSlice( int i );
118 double getTotalLength();
119 double getSubAxisLength();
120 double getReferenceArea();
121 double getReferenceAverDiam();
122 double getAverageArea(int pIni, int pEnd);
123 int getNumberOfSlices( );
125 marContour* getContour( int point, int contour );
126 vtkPoints* get3Dcontour( int point, int contour );
127 vtkPolyData* get2Dcontour( int point, int contour );
128 vtkPoints* get2DDiameterMin( int point, int contour );
129 vtkPoints* get2DDiameterMax( int point, int contour );
131 marParameters* getParameters();
132 marDynData* getDynData();
134 void getVOI( int* voi ) { _experiment->getVOI(voi); };
135 void setVOI( int* voi ) { _experiment->setVOI(voi); };
136 int getActualQuant( );
137 int getHealthySlice( );
138 int getHealthySliceStart( );
139 int getHealthySliceEnd( );
140 void setHealthySlice( int hsS, int hs, int hsE );
141 void setActualQuant(int act);
143 void replaceContour2D(int i,int size,double *vx,double *vy);
144 void replaceContour2D(int size,double *vx,double *vy, int type);
145 void cleanContours(int type);
146 void EraseContour(int i);
148 void ClearContours();
149 void RegenerateAxis();
150 void RegenerateSignal();
151 void RecalculateAxis();
152 void ClearContoursPartial(int start);
154 void getMinMax( double& min, double& max );
156 int getNumberOfContours(int point);
158 void updateLumenPercentage(int percentage);
159 void updateCalcPercentage(int percentage);
160 void updateDiscontinuityThreshold(int percentage);
162 marIsocontour* loadMarIsocontour(int size, double *vx, double *vy);
163 double performXOR(int type, std::vector<marIsocontour*> manual);
164 double performAND(int type, std::vector<marIsocontour*> manual);
165 double performUnion(int type, std::vector<marIsocontour*> manual);
167 void histogram(int point) ;
172 int getContourType(int point, int index);
173 void setCalibration(bool calib);
174 bool getCalibration();
175 void setStartIndex(int start);
178 marPoint* getPoint(int i);
179 void markUpLumen(int point);
182 marExperimentCT* GetExperiment();
184 marFilesBase* _dicom;
185 marParameters* _parameters;
189 std::string m_paramFileName;
192 marExperimentCT* _experiment;
195 #endif // __MAR__KERNEL__INTERFACECT__HXX__