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 /*=========================================================================
30 #ifndef __carotidaBifurcacion_h
31 #define __carotidaBifurcacion_h
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"
48 class carotidaBifurcacion : public vtkPolyDataSource
51 static carotidaBifurcacion *New();
52 void PrintSelf(ostream& os, vtkIndent indent);
54 virtual void SetInput(vtkPolyData *input);
55 vtkPolyData *GetInput();
57 virtual void SetInput2(vtkImageData *input);
58 vtkImageData *GetInput2();
60 void SetMaxPropRadio(double value);
61 double GetMaxPropRadio();
63 void SetHumbral(double value);
66 void SetMaxPropMasa(double value);
67 double GetMaxPropMasa();
69 void SetMinPropMasa(double value);
70 double GetMinPropMasa();
74 carotidaBifurcacion();
76 ~carotidaBifurcacion() {};
83 carotidaBifurcacion(const carotidaBifurcacion&); // Not implemented.
85 void operator=(const carotidaBifurcacion&); // Not implemented.
87 void searc(int i, int j, int k );
89 void find_components( );
91 unsigned short maximo();
95 double angulo(double i1, double j1, double k1, double i2, double j2, double k2 );
97 void direcciones(vtkPolyData *points, int iter, double radio, double puntocortea[3], double puntocortes[3] );
99 void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio );
101 void avanzar(vtkIdType iter);
103 int proporcion(vtkImageData *data );
105 void redondear(vtkImageData *data );
107 void limpiar(vtkPoints *profile, vtkPoints *profile2, vtkPoints *profile3, vtkPoints *profile4 );
109 int igual(double puntoactual[3], double puntoactualdis[3], double puntoantguar[3], double puntoantguardis[3] );
113 vtkImageData *dataprov;
115 unsigned long vector[50][4] ;
116 vtkExtractVOI *extrac;
117 vtkImageThreshold *thresh;
119 vtkImageSeedConnectivity *connect;
124 vtkCellArray *lineas;
127 vtkDoubleArray *salidas;