carotidaBifurcacion.h
Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef __carotidaBifurcacion_h
00006 #define __carotidaBifurcacion_h
00007
00008 #include "vtkPolyDataSource.h"
00009 #include "vtkImageThreshold.h"
00010 #include "vtkImageCast.h"
00011 #include "vtkImageSeedConnectivity.h"
00012 #include "vtkImageData.h"
00013 #include "vtkMarchingCubes.h"
00014 #include "vtkDoubleArray.h"
00015 #include "vtkPointData.h"
00016 #include "vtkExtractVOI.h"
00017 #include "vtkPoints.h"
00018 #include "vtkCellArray.h"
00019
00020
00021 class vtkPolyData;
00022
00023 class carotidaBifurcacion : public vtkPolyDataSource
00024 {
00025 public:
00026 static carotidaBifurcacion *New();
00027 void PrintSelf(ostream& os, vtkIndent indent);
00028
00029 virtual void SetInput(vtkPolyData *input);
00030 vtkPolyData *GetInput();
00031
00032 virtual void SetInput2(vtkImageData *input);
00033 vtkImageData *GetInput2();
00034
00035 void SetMaxPropRadio(double value);
00036 double GetMaxPropRadio();
00037
00038 void SetHumbral(double value);
00039 double GetHumbral();
00040
00041 void SetMaxPropMasa(double value);
00042 double GetMaxPropMasa();
00043
00044 void SetMinPropMasa(double value);
00045 double GetMinPropMasa();
00046
00047
00048 protected:
00049 carotidaBifurcacion();
00050
00051 ~carotidaBifurcacion() {};
00052
00053 void Execute();
00054
00055
00056
00057 private:
00058 carotidaBifurcacion(const carotidaBifurcacion&);
00059
00060 void operator=(const carotidaBifurcacion&);
00061
00062 void searc(int i, int j, int k );
00063
00064 void find_components( );
00065
00066 unsigned short maximo();
00067
00068 void blanquear();
00069
00070 double angulo(double i1, double j1, double k1, double i2, double j2, double k2 );
00071
00072 void direcciones(vtkPolyData *points, int iter, double radio, double puntocortea[3], double puntocortes[3] );
00073
00074 void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio );
00075
00076 void avanzar(vtkIdType iter);
00077
00078 int proporcion(vtkImageData *data );
00079
00080 void redondear(vtkImageData *data );
00081
00082 void limpiar(vtkPoints *profile, vtkPoints *profile2, vtkPoints *profile3, vtkPoints *profile4 );
00083
00084 int igual(double puntoactual[3], double puntoactualdis[3], double puntoantguar[3], double puntoantguardis[3] );
00085
00086
00087
00088 vtkImageData *dataprov;
00089 unsigned char label;
00090 unsigned long vector[50][4] ;
00091 vtkExtractVOI *extrac;
00092 vtkImageThreshold *thresh;
00093 vtkImageCast *cast;
00094 vtkImageSeedConnectivity *connect;
00095 vtkIdType iter;
00096
00097 vtkPoints *points;
00098
00099 vtkCellArray *lineas;
00100
00101
00102 vtkDoubleArray *salidas;
00103
00104 double humbral;
00105 double maxpropradio;
00106 double maxpropmasa;
00107 double minpropmasa;
00108
00109
00110 vtkPoints *points2;
00111
00112 vtkPoints *points3;
00113 vtkPoints *points4;
00114
00115
00116
00117 int buenos2;
00118
00119 };
00120
00121 #endif
00122
00123