]> Creatis software - FrontAlgorithms.git/blob - lib/fpa/VTK/Image/PathToPolyDataFilter.h
f454256125a5e87fb575c74c9f5db0c9248c1502
[FrontAlgorithms.git] / lib / fpa / VTK / Image / PathToPolyDataFilter.h
1 #ifndef __FPA__VTK__IMAGE__PATHTOPOLYDATAFILTER__H__
2 #define __FPA__VTK__IMAGE__PATHTOPOLYDATAFILTER__H__
3
4 #include <itkImageBase.h>
5 #include <vtkPolyDataAlgorithm.h>
6
7 namespace fpa
8 {
9   namespace VTK
10   {
11     namespace Image
12     {
13       /**
14        */
15       template< class _TMinimumSpanningTree >
16       class PathToPolyDataFilter
17         : public vtkPolyDataAlgorithm
18       {
19       public:
20         typedef PathToPolyDataFilter  Self;
21         typedef _TMinimumSpanningTree TMinimumSpanningTree;
22         typedef typename TMinimumSpanningTree::TVertex TVertex;
23         typedef itk::ImageBase< TVertex::Dimension >   TImage;
24
25       public:
26         vtkTypeMacro( PathToPolyDataFilter, vtkPolyDataAlgorithm );
27
28         vtkGetMacro( Seed0, TVertex );
29         vtkGetMacro( Seed1, TVertex );
30
31         vtkSetMacro( Seed0, TVertex );
32         vtkSetMacro( Seed1, TVertex );
33
34       public:
35         static Self* New( );
36
37         const TMinimumSpanningTree* GetMinimumSpanningTree( ) const;
38         const TImage* GetImage( ) const;
39         void SetMinimumSpanningTree( const TMinimumSpanningTree* mst );
40         void SetImage( const TImage* image );
41
42       protected:
43         PathToPolyDataFilter( );
44         virtual ~PathToPolyDataFilter( );
45
46         int RequestData(
47           vtkInformation* information,
48           vtkInformationVector** input,
49           vtkInformationVector* output
50           );
51         int RequestInformation(
52           vtkInformation* information,
53           vtkInformationVector** input,
54           vtkInformationVector* output
55           );
56
57         virtual void _PrepareOutput( vtkPolyData* out );
58
59       private:
60         // Purposely not implemented
61         PathToPolyDataFilter( const Self& );
62         void operator=( const Self& );
63
64       protected:
65         const TMinimumSpanningTree* m_MST;
66         const TImage* m_Image;
67         TVertex Seed0;
68         TVertex Seed1;
69       };
70
71     } // ecapseman
72
73   } // ecapseman
74
75 } // ecapseman
76
77 #ifndef ITK_MANUAL_INSTANTIATION
78 #  include <fpa/VTK/Image/PathToPolyDataFilter.hxx>
79 #endif // ITK_MANUAL_INSTANTIATION
80
81 #endif // __FPA__VTK__IMAGE__PATHTOPOLYDATAFILTER__H__
82
83 // eof - $RCSfile$