1 /*=========================================================================
5 #ifndef __axisExtractor_h
6 #define __axisExtractor_h
14 #include <sys/types.h>
15 #include <sys/timeb.h>
20 #include <vtkPolyDataSource.h>
21 #include <vtkImageThreshold.h>
22 #include <vtkImageCast.h>
23 #include <vtkImageSeedConnectivity.h>
24 #include <vtkImageData.h>
25 #include <vtkMarchingCubes.h>
26 #include <vtkDoubleArray.h>
27 #include <vtkPointData.h>
28 #include <vtkExtractVOI.h>
29 #include <vtkPoints.h>
30 #include <vtkCellArray.h>
31 #include <vtkImageResample.h>
37 class axisExtractor : public vtkPolyDataSource
40 static axisExtractor *New();
41 void PrintSelf(ostream& os, vtkIndent indent);
43 virtual void SetInput(vtkImageData *input);
44 vtkImageData *GetInput();
46 void SetMaxPropRadio(double value);
47 double GetMaxPropRadio();
49 void SetHumbral(double value);
52 void SetMaxPropMasa(double value);
53 double GetMaxPropMasa();
55 void SetMinPropMasa(double value);
56 double GetMinPropMasa();
58 void SetPoint(double puntoactualprov[3] );
60 vtkImageData *GetVolumen();
74 axisExtractor(const axisExtractor&); // Not implemented.
76 void operator=(const axisExtractor&); // Not implemented.
78 void searc(int i, int j, int k );
80 void find_components( );
82 unsigned short maximo();
90 void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio );
95 void redondear(vtkImageData *data );
99 void copiar(vtkImageData *data, vtkImageData *data2 );
101 double distancia(double a[3], double b[3] );
103 int envolumen(int a[3], vtkImageData *datae );
105 void realtoreal(double a[3], double b[3] );
108 void realtoreal2(double a[3], double b[3] );
110 void realtoindex(double a[3], int b[3] );
114 void indextoreal(int a[3], double b[3] );
117 void indextoreal(double a[3], double b[3] );
123 vtkImageData *dataprov;
124 vtkImageData *datatotal;
127 unsigned char label2;
129 unsigned long vector[50][4] ;
130 unsigned long vectorb[50][4] ;
132 vtkExtractVOI *extrac;
133 vtkImageThreshold *thresh;
135 vtkImageSeedConnectivity *connect;
137 vtkImageResample *resample;
143 vtkCellArray *lineas;
152 std::stack< double > m_Stack0;
153 std::stack< double > m_Stack1;
154 std::stack< double > m_Stack2;
155 std::stack< double > m_Stack3;
156 std::stack< double > m_Stack4;
157 std::stack< double > m_Stack5;
158 std::stack< int > m_Stack;