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
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
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
20 * \ingroup ImageFilters
\r
22 template <class TInputImage >
\r
23 class ITK_EXPORT ImageToVTKImageFilter : public ProcessObject
\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
32 /** Method for creation through the object factory. */
\r
35 /** Run-time type information (and related methods). */
\r
36 itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
\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
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
48 /** Set the input in the form of an itk::Image */
\r
49 void SetInput( const InputImageType * );
\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
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
61 /** This call delegate the update to the importer */
\r
65 ImageToVTKImageFilter();
\r
66 virtual ~ImageToVTKImageFilter();
\r
69 ImageToVTKImageFilter(const Self&); //purposely not implemented
\r
70 void operator=(const Self&); //purposely not implemented
\r
72 ExporterFilterPointer m_Exporter;
\r
73 vtkImageImport * m_Importer;
\r
77 } // end namespace itk
\r
79 #ifndef ITK_MANUAL_INSTANTIATION
\r
80 #include "itkImageToVTKImageFilter.txx"
\r