/*========================================================================= */ #ifndef __axisExtractor_h #define __axisExtractor_h #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include class axisExtractor : public vtkPolyDataSource { public: static axisExtractor *New(); void PrintSelf(ostream& os, vtkIndent indent); virtual void SetInput(vtkImageData *input); vtkImageData *GetInput(); void SetMaxPropRadio(double value); double GetMaxPropRadio(); void SetHumbral(double value); double GetHumbral(); void SetMaxPropMasa(double value); double GetMaxPropMasa(); void SetMinPropMasa(double value); double GetMinPropMasa(); void SetPoint(double puntoactualprov[3] ); vtkImageData *GetVolumen(); protected: axisExtractor(); ~axisExtractor() {}; void Execute(); private: axisExtractor(const axisExtractor&); // Not implemented. void operator=(const axisExtractor&); // Not implemented. void searc(int i, int j, int k ); void find_components( ); unsigned short maximo(); void blanquear(); void blanquear2(); void corte(double punto1[3], double punto2[3], double punto3[3], double centro[3], double radio ); void avanzar(); void redondear(vtkImageData *data ); void copiar(vtkImageData *data, vtkImageData *data2 ); double distancia(double a[3], double b[3] ); int envolumen(int a[3], vtkImageData *datae ); void realtoreal(double a[3], double b[3] ); void realtoreal2(double a[3], double b[3] ); void realtoindex(double a[3], int b[3] ); void indextoreal(int a[3], double b[3] ); void indextoreal(double a[3], double b[3] ); vtkImageData *dataprov; vtkImageData *datatotal; unsigned char label; unsigned char label2; unsigned long vector[50][4] ; unsigned long vectorb[50][4] ; vtkExtractVOI *extrac; vtkImageThreshold *thresh; vtkImageCast *cast; vtkImageSeedConnectivity *connect; vtkImageResample *resample; int iter; vtkPoints *points; vtkCellArray *lineas; double humbral; double maxpropradio; double maxpropmasa; double minpropmasa; int buenos; std::stack< double > m_Stack0; std::stack< double > m_Stack1; std::stack< double > m_Stack2; std::stack< double > m_Stack3; std::stack< double > m_Stack4; std::stack< double > m_Stack5; std::stack< int > m_Stack; int flagg; }; #endif