1 /*=========================================================================
2 Program: vv http://www.creatis.insa-lyon.fr/rio/vv
5 - University of LYON http://www.universite-lyon.fr/
6 - Léon Bérard cancer center http://www.centreleonberard.fr
7 - CREATIS CNRS laboratory http://www.creatis.insa-lyon.fr
9 This software is distributed WITHOUT ANY WARRANTY; without even
10 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
11 PURPOSE. See the copyright notices for more information.
13 It is distributed under dual licence
15 - BSD See included LICENSE.txt file
16 - CeCILL-B http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
17 ===========================================================================**/
18 #ifndef __itkImageToVTKImageFilter_h
\r
19 #define __itkImageToVTKImageFilter_h
\r
20 #include "itkVTKImageExport.h"
\r
21 #include "vtkImageImport.h"
\r
22 #include "vtkImageData.h"
\r
27 /** \class ImageToVTKImageFilter
\r
28 * \brief Converts an ITK image into a VTK image and plugs a
\r
29 * itk data pipeline to a VTK datapipeline.
\r
31 * This class puts together an itkVTKImageExporter and a vtkImageImporter.
\r
32 * It takes care of the details related to the connection of ITK and VTK
\r
33 * pipelines. The User will perceive this filter as an adaptor to which
\r
34 * an itk::Image can be plugged as input and a vtkImage is produced as
\r
37 * \ingroup ImageFilters
\r
39 template <class TInputImage >
\r
40 class ITK_EXPORT ImageToVTKImageFilter : public ProcessObject
\r
43 /** Standard class typedefs. */
\r
44 typedef ImageToVTKImageFilter Self;
\r
45 typedef ProcessObject Superclass;
\r
46 typedef SmartPointer<Self> Pointer;
\r
47 typedef SmartPointer<const Self> ConstPointer;
\r
49 /** Method for creation through the object factory. */
\r
52 /** Run-time type information (and related methods). */
\r
53 itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
\r
55 /** Some typedefs. */
\r
56 typedef TInputImage InputImageType;
\r
57 typedef typename InputImageType::ConstPointer InputImagePointer;
\r
58 typedef VTKImageExport< InputImageType> ExporterFilterType;
\r
59 typedef typename ExporterFilterType::Pointer ExporterFilterPointer;
\r
61 /** Get the output in the form of a vtkImage.
\r
62 This call is delegated to the internal vtkImageImporter filter */
\r
63 vtkImageData * GetOutput() const;
\r
65 /** Set the input in the form of an itk::Image */
\r
66 void SetInput( const InputImageType * );
\r
68 /** Return the internal VTK image importer filter.
\r
69 This is intended to facilitate users the access
\r
70 to methods in the importer */
\r
71 vtkImageImport * GetImporter() const;
\r
73 /** Return the internal ITK image exporter filter.
\r
74 This is intended to facilitate users the access
\r
75 to methods in the exporter */
\r
76 ExporterFilterType * GetExporter() const;
\r
78 /** This call delegate the update to the importer */
\r
82 ImageToVTKImageFilter();
\r
83 virtual ~ImageToVTKImageFilter();
\r
86 ImageToVTKImageFilter(const Self&); //purposely not implemented
\r
87 void operator=(const Self&); //purposely not implemented
\r
89 ExporterFilterPointer m_Exporter;
\r
90 vtkImageImport * m_Importer;
\r
94 } // end namespace itk
\r
96 #ifndef ITK_MANUAL_INSTANTIATION
\r
97 #include "itkImageToVTKImageFilter.txx"
\r