creaContours_lib
itk::VTKImageToImageFilter< TOutputImage > Class Template Reference

Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline. More...

#include <itkVTKImageToImageFilter.h>

Inheritance diagram for itk::VTKImageToImageFilter< TOutputImage >:
Collaboration diagram for itk::VTKImageToImageFilter< TOutputImage >:

Public Types

typedef VTKImageToImageFilter Self
 
typedef ProcessObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef TOutputImage OutputImageType
 
typedef
OutputImageType::ConstPointer 
OutputImagePointer
 
typedef VTKImageImport
< OutputImageType
ImporterFilterType
 
typedef ImporterFilterType::Pointer ImporterFilterPointer
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (VTKImageToImageFilter, ProcessObject)
 
const OutputImageTypeGetOutput () const
 
void SetInput (vtkImageData *)
 
vtkImageExport * GetExporter () const
 
ImporterFilterTypeGetImporter () const
 
void Update ()
 

Protected Member Functions

 VTKImageToImageFilter ()
 
virtual ~VTKImageToImageFilter ()
 

Private Member Functions

 VTKImageToImageFilter (const Self &)
 
void operator= (const Self &)
 

Private Attributes

ImporterFilterPointer m_Importer
 
vtkImageExport * m_Exporter
 

Detailed Description

template<class TOutputImage>
class itk::VTKImageToImageFilter< TOutputImage >

Converts a VTK image into an ITK image and plugs a vtk data pipeline to an ITK datapipeline.

This class puts together an itkVTKImageImporter and a vtkImageExporter. It takes care of the details related to the connection of ITK and VTK pipelines. The User will perceive this filter as an adaptor to which a vtkImage can be plugged as input and an itk::Image is produced as output.

Definition at line 69 of file itkVTKImageToImageFilter.h.

Member Typedef Documentation

template<class TOutputImage>
typedef SmartPointer<const Self> itk::VTKImageToImageFilter< TOutputImage >::ConstPointer

Definition at line 76 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef ImporterFilterType::Pointer itk::VTKImageToImageFilter< TOutputImage >::ImporterFilterPointer

Definition at line 88 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef VTKImageImport< OutputImageType > itk::VTKImageToImageFilter< TOutputImage >::ImporterFilterType

Definition at line 87 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef OutputImageType::ConstPointer itk::VTKImageToImageFilter< TOutputImage >::OutputImagePointer

Definition at line 86 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef TOutputImage itk::VTKImageToImageFilter< TOutputImage >::OutputImageType

Some typedefs.

Definition at line 85 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef SmartPointer<Self> itk::VTKImageToImageFilter< TOutputImage >::Pointer

Definition at line 75 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef VTKImageToImageFilter itk::VTKImageToImageFilter< TOutputImage >::Self

Standard class typedefs.

Definition at line 73 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
typedef ProcessObject itk::VTKImageToImageFilter< TOutputImage >::Superclass

Definition at line 74 of file itkVTKImageToImageFilter.h.

Constructor & Destructor Documentation

template<class TOutputImage >
itk::VTKImageToImageFilter< TOutputImage >::VTKImageToImageFilter ( )
protected

Constructor

Definition at line 57 of file itkVTKImageToImageFilter.txx.

58 {
59 
60  m_Exporter = vtkImageExport::New();
61 
62  m_Importer = ImporterFilterType::New();
63 
64  m_Importer->SetUpdateInformationCallback( m_Exporter->GetUpdateInformationCallback());
65  m_Importer->SetPipelineModifiedCallback( m_Exporter->GetPipelineModifiedCallback());
66  m_Importer->SetWholeExtentCallback( m_Exporter->GetWholeExtentCallback());
67  m_Importer->SetSpacingCallback( m_Exporter->GetSpacingCallback());
68  m_Importer->SetOriginCallback( m_Exporter->GetOriginCallback());
69  m_Importer->SetScalarTypeCallback( m_Exporter->GetScalarTypeCallback());
70  m_Importer->SetNumberOfComponentsCallback( m_Exporter->GetNumberOfComponentsCallback());
71  m_Importer->SetPropagateUpdateExtentCallback( m_Exporter->GetPropagateUpdateExtentCallback());
72  m_Importer->SetUpdateDataCallback( m_Exporter->GetUpdateDataCallback());
73  m_Importer->SetDataExtentCallback( m_Exporter->GetDataExtentCallback());
74  m_Importer->SetBufferPointerCallback( m_Exporter->GetBufferPointerCallback());
75  m_Importer->SetCallbackUserData( m_Exporter->GetCallbackUserData());
76 
77 }
template<class TOutputImage >
itk::VTKImageToImageFilter< TOutputImage >::~VTKImageToImageFilter ( )
protectedvirtual

Destructor

Definition at line 87 of file itkVTKImageToImageFilter.txx.

88 {
89  if( m_Exporter )
90  {
91  m_Exporter->Delete();
92  m_Exporter = 0;
93  }
94 }
template<class TOutputImage>
itk::VTKImageToImageFilter< TOutputImage >::VTKImageToImageFilter ( const Self )
private

Member Function Documentation

template<class TOutputImage >
vtkImageExport * itk::VTKImageToImageFilter< TOutputImage >::GetExporter ( ) const

Return the internal VTK image exporter filter. This is intended to facilitate users the access to methods in the exporter

Get the exporter filter

Definition at line 131 of file itkVTKImageToImageFilter.txx.

132 {
133  return m_Exporter;
134 }
template<class TOutputImage >
VTKImageToImageFilter< TOutputImage >::ImporterFilterType * itk::VTKImageToImageFilter< TOutputImage >::GetImporter ( ) const

Return the internal ITK image importer filter. This is intended to facilitate users the access to methods in the importer

Get the importer filter

Definition at line 144 of file itkVTKImageToImageFilter.txx.

145 {
146  return m_Importer;
147 }
template<class TOutputImage >
const VTKImageToImageFilter< TOutputImage >::OutputImageType * itk::VTKImageToImageFilter< TOutputImage >::GetOutput ( ) const

Get the output in the form of a vtkImage. This call is delegated to the internal vtkImageImporter filter

Get an itk::Image as output

Definition at line 117 of file itkVTKImageToImageFilter.txx.

118 {
119  return m_Importer->GetOutput();
120 }
template<class TOutputImage>
itk::VTKImageToImageFilter< TOutputImage >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class TOutputImage>
itk::VTKImageToImageFilter< TOutputImage >::itkTypeMacro ( VTKImageToImageFilter< TOutputImage >  ,
ProcessObject   
)

Run-time type information (and related methods).

template<class TOutputImage>
void itk::VTKImageToImageFilter< TOutputImage >::operator= ( const Self )
private
template<class TOutputImage >
void itk::VTKImageToImageFilter< TOutputImage >::SetInput ( vtkImageData *  inputImage)

Set the input in the form of a vtkImageData

Set a vtkImageData as input

Definition at line 104 of file itkVTKImageToImageFilter.txx.

105 {
106  m_Exporter->SetInput( inputImage );
107 }
template<class TOutputImage >
void itk::VTKImageToImageFilter< TOutputImage >::Update ( )

This call delegate the update to the importer

Delegate the Update to the importer

Definition at line 158 of file itkVTKImageToImageFilter.txx.

159 {
160  m_Importer->Update();
161 }

Member Data Documentation

template<class TOutputImage>
vtkImageExport* itk::VTKImageToImageFilter< TOutputImage >::m_Exporter
private

Definition at line 119 of file itkVTKImageToImageFilter.h.

template<class TOutputImage>
ImporterFilterPointer itk::VTKImageToImageFilter< TOutputImage >::m_Importer
private

Definition at line 118 of file itkVTKImageToImageFilter.h.


The documentation for this class was generated from the following files: