]> Creatis software - cpPlugins.git/blob - lib/cpExtensions/Visualization/ImageIndexesContainerToPolyData.h
...
[cpPlugins.git] / lib / cpExtensions / Visualization / ImageIndexesContainerToPolyData.h
1 #ifndef __CPEXTENSIONS__VISUALIZATION__IMAGEINDEXESCONTAINERTOPOLYDATA__H__
2 #define __CPEXTENSIONS__VISUALIZATION__IMAGEINDEXESCONTAINERTOPOLYDATA__H__
3
4 #include <vtkPolyDataAlgorithm.h>
5 #include <itkImageBase.h>
6
7 namespace cpExtensions
8 {
9   namespace Visualization
10   {
11     /**
12      */
13     template< class _TIndexes >
14     class ImageIndexesContainerToPolyData
15       : public vtkPolyDataAlgorithm
16     {
17     public:
18       typedef ImageIndexesContainerToPolyData Self;
19
20       typedef _TIndexes TIndexes;
21       typedef typename TIndexes::ComponentType TContainer;
22       typedef typename TContainer::value_type  TIndex;
23       typedef itk::ImageBase< TIndex::Dimension > TImage;
24
25     public:
26       vtkTypeMacro( ImageIndexesContainerToPolyData, vtkPolyDataAlgorithm );
27
28     public:
29       static Self* New( );
30
31       const TIndexes* GetInput( ) const;
32       const TImage* GetReferenceImage( ) const;
33       void SetInput( const TIndexes* c );
34       void SetReferenceImage( const TImage* i );
35
36     protected:
37       ImageIndexesContainerToPolyData( );
38       virtual ~ImageIndexesContainerToPolyData( );
39
40       int RequestData(
41         vtkInformation* information,
42         vtkInformationVector** input,
43         vtkInformationVector* output
44         );
45       int RequestInformation(
46         vtkInformation* information,
47         vtkInformationVector** input,
48         vtkInformationVector* output
49         );
50
51     private:
52       // Purposely not implemented
53       ImageIndexesContainerToPolyData( const Self& );
54       void operator=( const Self& );
55
56     protected:
57       const TIndexes* m_Indexes;
58       const TImage*   m_ReferenceImage;
59     };
60
61   } // ecapseman
62
63 } // ecapseman
64
65 #ifndef ITK_MANUAL_INSTANTIATION
66 #include <cpExtensions/Visualization/ImageIndexesContainerToPolyData.hxx>
67 #endif // ITK_MANUAL_INSTANTIATION
68
69 #endif //  __CPEXTENSIONS__VISUALIZATION__IMAGEINDEXESCONTAINERTOPOLYDATA__H__
70
71 // eof - $RCSfile$