Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkITKImageToImageFilterF2F.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Copyright Brigham and Women's Hospital (BWH) All Rights Reserved.
4
5 See COPYRIGHT.txt
6 or http://www.slicer.org/copyright/copyright.txt for details.
7
8 Program: vtkITK
9 Module: $HeadURL$
10 Date: $Date$
11 Version: $Revision$
12
13==========================================================================*/
14
15#ifndef __vtkITKImageToImageFilterF2F_h
16#define __vtkITKImageToImageFilterF2F_h
17
18
20#include "vtkImageAlgorithm.h"
21#include "itkImageToImageFilter.h"
22#include "itkVTKImageExport.h"
23#include "itkVTKImageImport.h"
24#include "vtkITKUtility.h"
25
26
28{
29public:
31 static vtkITKImageToImageFilterF2F* New() { return 0; };
32 void PrintSelf(ostream& os, vtkIndent indent)
33 {
34 Superclass::PrintSelf ( os, indent );
35 os << m_Filter;
36 };
37
38protected:
39
41 typedef itk::Vector<float,2> InputImagePixelType;
42 typedef float OutputImagePixelType;
43 typedef itk::Image<InputImagePixelType, 3> InputImageType;
44 typedef itk::Image<OutputImagePixelType, 3> OutputImageType;
45
46 typedef itk::VTKImageImport<InputImageType> ImageImportType;
47 typedef itk::VTKImageExport<OutputImageType> ImageExportType;
48 ImageImportType::Pointer itkImporter;
49 ImageExportType::Pointer itkExporter;
50
51 typedef itk::ImageToImageFilter<InputImageType,OutputImageType> GenericFilterType;
52 GenericFilterType::Pointer m_Filter;
53
55 {
57 m_Filter = filter;
58 this->itkImporter = ImageImportType::New();
59 this->itkExporter = ImageExportType::New();
60 ConnectPipelines(this->vtkExporter, this->itkImporter);
61 ConnectPipelines(this->itkExporter, this->vtkImporter);
62 this->LinkITKProgressToVTKProgress ( m_Filter );
63
65 m_Filter->SetInput ( this->itkImporter->GetOutput() );
66 this->itkExporter->SetInput ( m_Filter->GetOutput() );
67 this->vtkCast->SetOutputScalarTypeToFloat();
68 };
69
73
74private:
76 void operator=(const vtkITKImageToImageFilterF2F&);
77};
78
79#endif
void PrintSelf(ostream &os, vtkIndent indent)
GenericFilterType::Pointer m_Filter
itk::VTKImageImport< InputImageType > ImageImportType
itk::ImageToImageFilter< InputImageType, OutputImageType > GenericFilterType
vtkITKImageToImageFilterF2F(GenericFilterType *filter)
itk::VTKImageExport< OutputImageType > ImageExportType
itk::Image< InputImagePixelType, 3 > InputImageType
itk::Vector< float, 2 > InputImagePixelType
To/from ITK.
static vtkITKImageToImageFilterF2F * New()
itk::Image< OutputImagePixelType, 3 > OutputImageType
void LinkITKProgressToVTKProgress(itk::ProcessObject *process)
BTX.
void PrintSelf(ostream &os, vtkIndent indent) override
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)