Shapeworks Studio  2.1
Shape analysis software suite
List of all members | Public Types | Public Member Functions | Protected Member Functions
itk::ImageToVTKImageFilter< TInputImage > Class Template Reference

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

#include <itkImageToVTKImageFilter.h>

+ Inheritance diagram for itk::ImageToVTKImageFilter< TInputImage >:
+ Collaboration diagram for itk::ImageToVTKImageFilter< TInputImage >:

Public Types

typedef ImageToVTKImageFilter Self
 
typedef ProcessObject Superclass
 
typedef SmartPointer< SelfPointer
 
typedef SmartPointer< const SelfConstPointer
 
typedef TInputImage InputImageType
 
typedef InputImageType::ConstPointer InputImagePointer
 
typedef VTKImageExport< InputImageTypeExporterFilterType
 
typedef ExporterFilterType::Pointer ExporterFilterPointer
 

Public Member Functions

 itkNewMacro (Self)
 
 itkTypeMacro (ImageToVTKImageFilter, ProcessObject)
 
vtkImageData * GetOutput () const
 
void SetInput (const InputImageType *)
 
vtkImageImport * GetImporter () const
 
ExporterFilterType * GetExporter () const
 
void Update ()
 

Protected Member Functions

 ImageToVTKImageFilter ()
 
virtual ~ImageToVTKImageFilter ()
 

Detailed Description

template<class TInputImage>
class itk::ImageToVTKImageFilter< TInputImage >

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

This class puts together an itkVTKImageExporter and a vtkImageImporter. 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 an itk::Image can be plugged as input and a vtkImage is produced as output.

Definition at line 41 of file itkImageToVTKImageFilter.h.

Member Typedef Documentation

template<class TInputImage>
typedef TInputImage itk::ImageToVTKImageFilter< TInputImage >::InputImageType

Some typedefs.

Definition at line 57 of file itkImageToVTKImageFilter.h.

template<class TInputImage>
typedef ImageToVTKImageFilter itk::ImageToVTKImageFilter< TInputImage >::Self

Standard class typedefs.

Definition at line 45 of file itkImageToVTKImageFilter.h.

Constructor & Destructor Documentation

template<class TInputImage >
itk::ImageToVTKImageFilter< TInputImage >::ImageToVTKImageFilter ( )
protected

Constructor

Definition at line 31 of file itkImageToVTKImageFilter.hxx.

32 {
33  m_Importer = vtkImageImport::New();
34  m_Exporter = ExporterFilterType::New();
35 
36  m_Importer->SetUpdateInformationCallback(m_Exporter->GetUpdateInformationCallback());
37  m_Importer->SetPipelineModifiedCallback(m_Exporter->GetPipelineModifiedCallback());
38  m_Importer->SetWholeExtentCallback(m_Exporter->GetWholeExtentCallback());
39  m_Importer->SetSpacingCallback(m_Exporter->GetSpacingCallback());
40  m_Importer->SetOriginCallback(m_Exporter->GetOriginCallback());
41  m_Importer->SetScalarTypeCallback(m_Exporter->GetScalarTypeCallback());
42  m_Importer->SetNumberOfComponentsCallback(m_Exporter->GetNumberOfComponentsCallback());
43  m_Importer->SetPropagateUpdateExtentCallback(m_Exporter->GetPropagateUpdateExtentCallback());
44  m_Importer->SetUpdateDataCallback(m_Exporter->GetUpdateDataCallback());
45  m_Importer->SetDataExtentCallback(m_Exporter->GetDataExtentCallback());
46  m_Importer->SetBufferPointerCallback(m_Exporter->GetBufferPointerCallback());
47  m_Importer->SetCallbackUserData(m_Exporter->GetCallbackUserData());
48 
49 }
template<class TInputImage >
itk::ImageToVTKImageFilter< TInputImage >::~ImageToVTKImageFilter ( )
protectedvirtual

Destructor

Definition at line 56 of file itkImageToVTKImageFilter.hxx.

57 {
58  if( m_Importer )
59  {
60  m_Importer->Delete();
61  m_Importer = 0;
62  }
63 }

Member Function Documentation

template<class TInputImage >
ImageToVTKImageFilter< TInputImage >::ExporterFilterType * itk::ImageToVTKImageFilter< TInputImage >::GetExporter ( ) const

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

Get the exporter filter

Definition at line 104 of file itkImageToVTKImageFilter.hxx.

105 {
106  return m_Exporter.GetPointer();
107 }
template<class TInputImage >
vtkImageImport * itk::ImageToVTKImageFilter< TInputImage >::GetImporter ( ) const

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

Get the importer filter

Definition at line 93 of file itkImageToVTKImageFilter.hxx.

94 {
95  return m_Importer;
96 }
template<class TInputImage >
vtkImageData * itk::ImageToVTKImageFilter< TInputImage >::GetOutput ( ) const

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

Get a vtkImage as output

Definition at line 82 of file itkImageToVTKImageFilter.hxx.

83 {
84  return m_Importer->GetOutput();
85 }
template<class TInputImage>
itk::ImageToVTKImageFilter< TInputImage >::itkNewMacro ( Self  )

Method for creation through the object factory.

template<class TInputImage>
itk::ImageToVTKImageFilter< TInputImage >::itkTypeMacro ( ImageToVTKImageFilter< TInputImage >  ,
ProcessObject   
)

Run-time type information (and related methods).

template<class TInputImage >
void itk::ImageToVTKImageFilter< TInputImage >::SetInput ( const InputImageType inputImage)

Set the input in the form of an itk::Image

Set an itk::Image as input

Definition at line 71 of file itkImageToVTKImageFilter.hxx.

72 {
73  m_Exporter->SetInput( inputImage );
74 }
template<class TInputImage >
void itk::ImageToVTKImageFilter< TInputImage >::Update ( )

This call delegate the update to the importer

Delegate the Update to the importer

Definition at line 115 of file itkImageToVTKImageFilter.hxx.

116 {
117  m_Importer->Update();
118 }

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