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