1 /*=========================================================================
4 Module: $RCSfile: marAxisCT.h,v $
6 Date: $Date: 2009/05/14 13:55:07 $
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 =========================================================================*/
18 #ifndef __MAR__KERNEL__AXISCT__HXX__
19 #define __MAR__KERNEL__AXISCT__HXX__
24 #include <marAxisContours.h>
26 #include <marIsocontour.h>
30 class MAR_KERNEL_EXPORT marAxisCT : public marAxis
37 marContour* getContour( int point , kVolume* vol, int index ); // DATA-MODEL-2D
38 vtkPoints* get3Dcontour( int point , kVolume* vol, int index ); // VISUALISATION-VTK 3D
39 vtkPolyData* get2Dcontour( int point , kVolume* vol, int index ); // VISUALISATION-VTK 2D
40 vtkPoints* get2DDiameterMin( int point , kVolume* vol, int index ); // VISUALISATION-VTK 3D
41 vtkPoints* get2DDiameterMax( int point , kVolume* vol, int index ); // VISUALISATION-VTK 3D
42 int getSignal(int point, int index, kVolume* vol);
43 void updateLumenPercentage(int point, kVolume* vol);
44 void updateCalcPercentage(int point, kVolume* vol);
46 void replaceContour2D(int point,int size,double *vx,double *vy, int type);
48 marContourVO* searchContour(int type, int point);
49 int getNumberOfContours(int point, kVolume* vol);
50 int getContourType(int point, int index, kVolume* vol );
51 void createEmptyContours();
53 void eraseContoursPartial(int start);
55 void histogram(int point, kVolume* vol);
56 void setCalibration(bool calib);
57 bool getCalibration();
60 void setStartIndex(int start);
63 marPoint* getPoint(int i);
64 void markUpLumen(int point, kVolume* vol);
65 void generateFile(int point,kVolume* vol);
67 void cleanContours(int type, int point);
68 double performXOR(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
69 double performAND(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
70 double performUnion(int type, int point, std::vector<marIsocontour *> manual, kVolume* vol);
71 marIsocontour* loadMarIsocontour(int size, double *vx, double *vy);
76 void createContours( int point , kVolume* vol );
77 void create3Dcontours( int point , kVolume* vol );
78 void create2Dcontours( int point , kVolume* vol );
79 void create2DDiametersMin(int point , kVolume* vol );
80 void create2DDiametersMax(int point , kVolume* vol );
81 void createSignals (int point, kVolume* vol);
82 void generatePoints(int point, kVolume* vol, std::vector<marIsocontour*> *list);
83 int getMaximumGrad(std::vector <marPoint *> list, int iniPos, int limit, double threshold);
84 int getMinimumGrad(std::vector <marPoint *> list, int iniPos, int limit, double threshold);
85 double interpolate(double x, double y, vtkImageData* imagedata);
86 void generateVector(int dir,int *coordBase,double originX,double originY,double *x,double *y);
87 bool detectNeighbor(marIsocontour* contour,int dir, int type);
88 marIsocontour* addPointToContour(marIsocontour* cont ,bool inside,int type,marPoint* point);
89 void unifyDividedStructure(std::vector<marIsocontour*> *contList);
90 double getStatistics(marIsocontour* contour, double x, double y, vtkImageData* imagedata);
91 double getCalcStatistics(marIsocontour* contour, double x, double y, vtkImageData* imagedata,int i);
92 int round(double num);
93 int getMaxIntensity(int point);
94 bool pointInPolygon(marIsocontour *c, double x, double y);
95 marIsocontour* parsePolyDataToMarIsocontour(marContourVO* contourVO);
97 marIsocontour* filterContour(marIsocontour* contExt, marIsocontour* contInt, double radio);
99 double obtainContourArea(marIsocontour*contour);
100 void adjustWall(int point, kVolume* vol);
101 void adjustCalcification(int point, kVolume* vol);
102 void adjustContour(int point, kVolume* vol);
103 int maxValue(std::vector <double> list);
104 int getDiameter(marContourVO* contourVO, double x, double y, int limInfX, int limInfY, int limSupX, int limSupY);
106 int searchData(std::vector<double> vec, double value);
108 void extractLumen(vtkImageData *lumenImage, marIsocontour *lumenContour, int point);
116 // Contours per slice
119 // marIsocontour* shrinkContour(marIsocontour *cont, double thresh, vtkImageData* imageData, double radio);
123 #endif // __MAR__KERNEL__AXISCT__HXX__