axisExtractor.h
Go to the documentation of this file.00001
00002
00003
00004
00005 #ifndef __axisExtractor_h
00006 #define __axisExtractor_h
00007
00008
00009
00010 #include <list>
00011 #include <stack>
00012 #include <time.h>
00013 #include <stdio.h>
00014 #include <sys/types.h>
00015 #include <sys/timeb.h>
00016 #include <string.h>
00017
00018
00019
00020 #include <vtkPolyDataSource.h>
00021 #include <vtkImageThreshold.h>
00022 #include <vtkImageCast.h>
00023 #include <vtkImageSeedConnectivity.h>
00024 #include <vtkImageData.h>
00025 #include <vtkMarchingCubes.h>
00026 #include <vtkDoubleArray.h>
00027 #include <vtkPointData.h>
00028 #include <vtkExtractVOI.h>
00029 #include <vtkPoints.h>
00030 #include <vtkCellArray.h>
00031 #include <vtkImageResample.h>
00032
00033
00034
00035
00036
00037 class axisExtractor : public vtkPolyDataSource
00038 {
00039 public:
00040 static axisExtractor *New();
00041 void PrintSelf(ostream& os, vtkIndent indent);
00042
00043 virtual void SetInput(vtkImageData *input);
00044 vtkImageData *GetInput();
00045
00046 void SetMaxPropRadio(double value);
00047 double GetMaxPropRadio();
00048
00049 void SetHumbral(double value);
00050 double GetHumbral();
00051
00052 void SetMaxPropMasa(double value);
00053 double GetMaxPropMasa();
00054
00055 void SetMinPropMasa(double value);
00056 double GetMinPropMasa();
00057
00058 void SetPoint(double puntoactualprov[3] );
00059
00060 vtkImageData *GetVolumen();
00061
00062
00063
00064 protected:
00065 axisExtractor();
00066
00067 ~axisExtractor() {};
00068
00069 void Execute();
00070
00071
00072
00073 private:
00074 axisExtractor(const axisExtractor&);
00075
00076 void operator=(const axisExtractor&);
00077
00078 void searc(int i, int j, int k );
00079
00080 void find_components( );
00081
00082 unsigned short maximo();
00083
00084 void blanquear();
00085
00086 void blanquear2();
00087
00088
00089
00090 void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio );
00091
00092 void avanzar();
00093
00094
00095 void redondear(vtkImageData *data );
00096
00097
00098
00099 void copiar(vtkImageData *data, vtkImageData *data2 );
00100
00101 double distancia(double a[3], double b[3] );
00102
00103 int envolumen(int a[3], vtkImageData *datae );
00104
00105 void realtoreal(double a[3], double b[3] );
00106
00107
00108 void realtoreal2(double a[3], double b[3] );
00109
00110 void realtoindex(double a[3], int b[3] );
00111
00112
00113
00114 void indextoreal(int a[3], double b[3] );
00115
00116
00117 void indextoreal(double a[3], double b[3] );
00118
00119
00120
00121
00122
00123 vtkImageData *dataprov;
00124 vtkImageData *datatotal;
00125
00126 unsigned char label;
00127 unsigned char label2;
00128
00129 unsigned long vector[50][4] ;
00130 unsigned long vectorb[50][4] ;
00131
00132 vtkExtractVOI *extrac;
00133 vtkImageThreshold *thresh;
00134 vtkImageCast *cast;
00135 vtkImageSeedConnectivity *connect;
00136
00137 vtkImageResample *resample;
00138
00139 int iter;
00140
00141 vtkPoints *points;
00142
00143 vtkCellArray *lineas;
00144
00145 double humbral;
00146 double maxpropradio;
00147 double maxpropmasa;
00148 double minpropmasa;
00149
00150 int buenos;
00151
00152 std::stack< double > m_Stack0;
00153 std::stack< double > m_Stack1;
00154 std::stack< double > m_Stack2;
00155 std::stack< double > m_Stack3;
00156 std::stack< double > m_Stack4;
00157 std::stack< double > m_Stack5;
00158 std::stack< int > m_Stack;
00159
00160 int flagg;
00161
00162 };
00163
00164 #endif
00165
00166