]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/include/carotidaBifurcacion.h
2a69f5334c3aa2302606b92c1d34d93a0f49b9ec
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / carotidaBifurcacion.h
1 /*=========================================================================
2
3   */
4
5 #ifndef __carotidaBifurcacion_h
6 #define __carotidaBifurcacion_h
7
8 #include "vtkPolyDataSource.h"
9 #include "vtkImageThreshold.h"
10 #include "vtkImageCast.h"
11 #include "vtkImageSeedConnectivity.h"
12 #include "vtkImageData.h"
13 #include "vtkMarchingCubes.h"
14 #include "vtkDoubleArray.h"
15 #include "vtkPointData.h"
16 #include "vtkExtractVOI.h"
17 #include "vtkPoints.h"
18 #include "vtkCellArray.h"
19
20
21 class vtkPolyData;
22
23 class  carotidaBifurcacion : public vtkPolyDataSource
24 {
25 public:
26         static carotidaBifurcacion *New();
27         void PrintSelf(ostream& os, vtkIndent indent);
28
29         virtual void SetInput(vtkPolyData *input);
30         vtkPolyData *GetInput();
31
32         virtual void SetInput2(vtkImageData *input);
33         vtkImageData *GetInput2();
34
35         void SetMaxPropRadio(double value);
36         double GetMaxPropRadio();
37
38         void SetHumbral(double value);
39         double GetHumbral();
40
41         void SetMaxPropMasa(double value);
42         double GetMaxPropMasa();
43
44         void SetMinPropMasa(double value);
45         double GetMinPropMasa();
46   
47   
48 protected:  
49         carotidaBifurcacion();
50         
51         ~carotidaBifurcacion() {};
52
53         void Execute();
54  
55   
56
57 private:
58         carotidaBifurcacion(const carotidaBifurcacion&);  // Not implemented.
59
60         void operator=(const carotidaBifurcacion&);  // Not implemented.
61   
62         void searc(int i, int j, int k );
63
64         void find_components( );
65
66         unsigned short maximo();
67
68         void blanquear();
69
70         double angulo(double i1, double j1, double k1, double i2, double j2, double k2 );
71
72         void direcciones(vtkPolyData *points, int iter, double radio, double puntocortea[3], double puntocortes[3] );
73
74         void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3],  double radio );
75
76         void avanzar(vtkIdType iter);
77
78         int proporcion(vtkImageData *data );
79
80         void redondear(vtkImageData *data );
81
82         void limpiar(vtkPoints *profile, vtkPoints *profile2, vtkPoints *profile3, vtkPoints *profile4 );
83
84         int igual(double puntoactual[3], double puntoactualdis[3], double puntoantguar[3], double puntoantguardis[3] );
85
86
87
88         vtkImageData *dataprov;
89         unsigned char label;
90         unsigned long vector[50][4] ;
91         vtkExtractVOI *extrac;
92         vtkImageThreshold *thresh;
93         vtkImageCast *cast;
94         vtkImageSeedConnectivity *connect;
95         vtkIdType iter;
96
97         vtkPoints *points;
98
99         vtkCellArray *lineas; 
100
101         
102         vtkDoubleArray *salidas;
103
104         double humbral;
105         double maxpropradio;
106         double maxpropmasa;
107         double minpropmasa;
108
109
110         vtkPoints *points2;
111
112         vtkPoints *points3;
113         vtkPoints *points4;
114
115  
116
117         int buenos2;
118         
119 };
120
121 #endif
122
123