]> Creatis software - creaMaracasVisu.git/blob - lib/maracasVisuLib/src/kernel/include/carotidaBifurcacion.h
Support #1768 CREATIS Licence insertion
[creaMaracasVisu.git] / lib / maracasVisuLib / src / kernel / include / carotidaBifurcacion.h
1 /*# ---------------------------------------------------------------------
2 #
3 # Copyright (c) CREATIS (Centre de Recherche en Acquisition et Traitement de l'Image
4 #                        pour la Sant�)
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
8 #
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.
15 #
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
20 #  liability.
21 #
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 # ------------------------------------------------------------------------ */
25
26 /*=========================================================================
27
28   */
29
30 #ifndef __carotidaBifurcacion_h
31 #define __carotidaBifurcacion_h
32
33 #include "vtkPolyDataSource.h"
34 #include "vtkImageThreshold.h"
35 #include "vtkImageCast.h"
36 #include "vtkImageSeedConnectivity.h"
37 #include "vtkImageData.h"
38 #include "vtkMarchingCubes.h"
39 #include "vtkDoubleArray.h"
40 #include "vtkPointData.h"
41 #include "vtkExtractVOI.h"
42 #include "vtkPoints.h"
43 #include "vtkCellArray.h"
44
45
46 class vtkPolyData;
47
48 class  carotidaBifurcacion : public vtkPolyDataSource
49 {
50 public:
51         static carotidaBifurcacion *New();
52         void PrintSelf(ostream& os, vtkIndent indent);
53
54         virtual void SetInput(vtkPolyData *input);
55         vtkPolyData *GetInput();
56
57         virtual void SetInput2(vtkImageData *input);
58         vtkImageData *GetInput2();
59
60         void SetMaxPropRadio(double value);
61         double GetMaxPropRadio();
62
63         void SetHumbral(double value);
64         double GetHumbral();
65
66         void SetMaxPropMasa(double value);
67         double GetMaxPropMasa();
68
69         void SetMinPropMasa(double value);
70         double GetMinPropMasa();
71   
72   
73 protected:  
74         carotidaBifurcacion();
75         
76         ~carotidaBifurcacion() {};
77
78         void Execute();
79  
80   
81
82 private:
83         carotidaBifurcacion(const carotidaBifurcacion&);  // Not implemented.
84
85         void operator=(const carotidaBifurcacion&);  // Not implemented.
86   
87         void searc(int i, int j, int k );
88
89         void find_components( );
90
91         unsigned short maximo();
92
93         void blanquear();
94
95         double angulo(double i1, double j1, double k1, double i2, double j2, double k2 );
96
97         void direcciones(vtkPolyData *points, int iter, double radio, double puntocortea[3], double puntocortes[3] );
98
99         void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3],  double radio );
100
101         void avanzar(vtkIdType iter);
102
103         int proporcion(vtkImageData *data );
104
105         void redondear(vtkImageData *data );
106
107         void limpiar(vtkPoints *profile, vtkPoints *profile2, vtkPoints *profile3, vtkPoints *profile4 );
108
109         int igual(double puntoactual[3], double puntoactualdis[3], double puntoantguar[3], double puntoantguardis[3] );
110
111
112
113         vtkImageData *dataprov;
114         unsigned char label;
115         unsigned long vector[50][4] ;
116         vtkExtractVOI *extrac;
117         vtkImageThreshold *thresh;
118         vtkImageCast *cast;
119         vtkImageSeedConnectivity *connect;
120         vtkIdType iter;
121
122         vtkPoints *points;
123
124         vtkCellArray *lineas; 
125
126         
127         vtkDoubleArray *salidas;
128
129         double humbral;
130         double maxpropradio;
131         double maxpropmasa;
132         double minpropmasa;
133
134
135         vtkPoints *points2;
136
137         vtkPoints *points3;
138         vtkPoints *points4;
139
140  
141
142         int buenos2;
143         
144 };
145
146 #endif
147
148