15 #ifndef __vtkITKImageToImageFilterF2F2_h 16 #define __vtkITKImageToImageFilterF2F2_h 19 #include "vtkImageAlgorithm.h" 20 #include "vtkImageAppendComponents.h" 21 #include "itkImageToImageFilter.h" 22 #include "itkSplitImageFilter.h" 23 #include "itkJoinImageFilter.h" 24 #include "itkVTKImageExport.h" 25 #include "itkVTKImageImport.h" 27 #include <vtkVersion.h> 36 Superclass::PrintSelf ( os, indent );
48 this->vtkImageAlgorithm::SetInput(1, Input);
49 this->vtkExporter1->SetInputData(Input);
52 virtual vtkImageData *
GetOutput() {
return this->append->GetOutput(); };
80 SplitFilterType::Pointer
split1, split;
81 JoinFilterType::Pointer
join;
85 this->vtkImporter1 = vtkImageImport::New();
86 this->vtkExporter1 = vtkImageExport::New();
89 this->itkImporter = ImageImportType::New();
90 this->itkExporter = ImageExportType::New();
94 this->itkImporter1 = ImageImportType::New();
95 this->itkExporter1 = ImageExportType::New();
102 join = JoinFilterType::New();
103 join->SetInput1 ( this->itkImporter->GetOutput() );
104 join->SetInput2 ( this->itkImporter->GetOutput() );
106 m_Filter->SetInput ( join->GetOutput() );
109 split = SplitFilterType::New();
111 split->SetInput ( m_Filter->GetOutput() );
112 split->SetIndex ( 0 );
113 split1 = SplitFilterType::New();
115 split1->SetInput ( m_Filter->GetOutput() );
116 split1->SetIndex ( 1 );
118 this->itkExporter->SetInput ( split->GetOutput() );
119 this->itkExporter1->SetInput ( split1->GetOutput() );
121 this->append = vtkImageAppendComponents::New();
122 this->append->SetInput ( 0, this->vtkImporter->GetOutput() );
123 this->append->SetInput ( 1, this->vtkImporter1->GetOutput() );
124 this->vtkCast->SetOutputScalarTypeToFloat();
143 this->vtkExporter1->Delete();
144 this->vtkImporter1->Delete();
145 this->append->Delete();
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)
virtual vtkImageData * GetOutput()
itk::Image< float, 3 > JoinImageType
GenericFilterType::Pointer m_Filter
itk::VTKImageExport< JoinImageType > ImageExportType
vtkImageAppendComponents * append
~vtkITKImageToImageFilterF2F2()
static vtkITKImageToImageFilterF2F2 * New()
ImageImportType::Pointer itkImporter1
ImageExportType::Pointer itkExporter
itk::Image< InputImagePixelType, 3 > InputImageType
itk::VTKImageImport< JoinImageType > ImageImportType
vtkImageImport * vtkImporter1
itk::Image< OutputImagePixelType, 3 > OutputImageType
itk::SplitImageFilter< OutputImageType, JoinImageType > SplitFilterType
Abstract base class for connecting ITK and VTK.
vtkITKImageToImageFilterF2F2(GenericFilterType *filter)
itk::JoinImageFilter< JoinImageType, JoinImageType > JoinFilterType
itk::Vector< float, 2 > OutputImagePixelType
void PrintSelf(ostream &os, vtkIndent indent)
virtual void SetInput2(vtkImageData *Input)
itk::ImageToImageFilter< InputImageType, OutputImageType > GenericFilterType
vtkImageExport * vtkExporter1
virtual void SetInput(vtkImageData *Input)
Set the Input of the filter.
ImageExportType::Pointer itkExporter1
JoinFilterType::Pointer join
virtual void SetInput1(vtkImageData *Input)
Set the Input of the filter.
void LinkITKProgressToVTKProgress(itk::ProcessObject *process)
BTX.
SplitFilterType::Pointer split1
ImageImportType::Pointer itkImporter
itk::Vector< float, 2 > InputImagePixelType
To/from ITK.