]> Creatis software - clitk.git/blob - itk/itkImageToVTKImageFilter.h
removed headers
[clitk.git] / itk / itkImageToVTKImageFilter.h
1 #ifndef __itkImageToVTKImageFilter_h\r
2 #define __itkImageToVTKImageFilter_h\r
3 #include "itkVTKImageExport.h"\r
4 #include "vtkImageImport.h"\r
5 #include "vtkImageData.h"\r
6 \r
7 namespace itk\r
8 {\r
9 \r
10 /** \class ImageToVTKImageFilter\r
11  * \brief Converts an ITK image into a VTK image and plugs a\r
12  *  itk data pipeline to a VTK datapipeline.\r
13  *\r
14  *  This class puts together an itkVTKImageExporter and a vtkImageImporter.\r
15  *  It takes care of the details related to the connection of ITK and VTK\r
16  *  pipelines. The User will perceive this filter as an adaptor to which\r
17  *  an itk::Image can be plugged as input and a vtkImage is produced as\r
18  *  output.\r
19  *\r
20  * \ingroup   ImageFilters\r
21  */\r
22 template <class TInputImage >\r
23 class ITK_EXPORT ImageToVTKImageFilter : public ProcessObject\r
24 {\r
25 public:\r
26     /** Standard class typedefs. */\r
27     typedef ImageToVTKImageFilter       Self;\r
28     typedef ProcessObject             Superclass;\r
29     typedef SmartPointer<Self>        Pointer;\r
30     typedef SmartPointer<const Self>  ConstPointer;\r
31 \r
32     /** Method for creation through the object factory. */\r
33     itkNewMacro(Self);\r
34 \r
35     /** Run-time type information (and related methods). */\r
36     itkTypeMacro(ImageToVTKImageFilter, ProcessObject);\r
37 \r
38     /** Some typedefs. */\r
39     typedef TInputImage InputImageType;\r
40     typedef typename    InputImageType::ConstPointer    InputImagePointer;\r
41     typedef VTKImageExport< InputImageType>            ExporterFilterType;\r
42     typedef typename ExporterFilterType::Pointer        ExporterFilterPointer;\r
43 \r
44     /** Get the output in the form of a vtkImage.\r
45         This call is delegated to the internal vtkImageImporter filter  */\r
46     vtkImageData *  GetOutput() const;\r
47 \r
48     /** Set the input in the form of an itk::Image */\r
49     void SetInput( const InputImageType * );\r
50 \r
51     /** Return the internal VTK image importer filter.\r
52         This is intended to facilitate users the access\r
53         to methods in the importer */\r
54     vtkImageImport * GetImporter() const;\r
55 \r
56     /** Return the internal ITK image exporter filter.\r
57         This is intended to facilitate users the access\r
58         to methods in the exporter */\r
59     ExporterFilterType * GetExporter() const;\r
60 \r
61     /** This call delegate the update to the importer */\r
62     void Update();\r
63 \r
64 protected:\r
65     ImageToVTKImageFilter();\r
66     virtual ~ImageToVTKImageFilter();\r
67 \r
68 private:\r
69     ImageToVTKImageFilter(const Self&); //purposely not implemented\r
70     void operator=(const Self&); //purposely not implemented\r
71 \r
72     ExporterFilterPointer       m_Exporter;\r
73     vtkImageImport            * m_Importer;\r
74 \r
75 };\r
76 \r
77 } // end namespace itk\r
78 \r
79 #ifndef ITK_MANUAL_INSTANTIATION\r
80 #include "itkImageToVTKImageFilter.txx"\r
81 #endif\r
82 \r
83 #endif\r
84 \r
85 \r
86 \r