Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
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
19#include "vtkImageAlgorithm.h"
20#include "itkImageToImageFilter.h"
21#include "itkVTKImageExport.h"
22#include "itkVTKImageImport.h"
23#include "vtkITKUtility.h"
24
26{
27public:
29 static vtkITKImageToImageFilterF2F* New() { return 0; };
30 void PrintSelf(ostream& os, vtkIndent indent)
31 {
32 Superclass::PrintSelf(os, indent);
33 os << m_Filter;
34 };
35
36protected:
38 typedef itk::Vector<float, 2> InputImagePixelType;
39 typedef float OutputImagePixelType;
40 typedef itk::Image<InputImagePixelType, 3> InputImageType;
41 typedef itk::Image<OutputImagePixelType, 3> OutputImageType;
42
43 typedef itk::VTKImageImport<InputImageType> ImageImportType;
44 typedef itk::VTKImageExport<OutputImageType> ImageExportType;
45 ImageImportType::Pointer itkImporter;
46 ImageExportType::Pointer itkExporter;
47
48 typedef itk::ImageToImageFilter<InputImageType, OutputImageType> GenericFilterType;
49 GenericFilterType::Pointer m_Filter;
50
52 {
54 m_Filter = filter;
55 this->itkImporter = ImageImportType::New();
56 this->itkExporter = ImageExportType::New();
57 ConnectPipelines(this->vtkExporter, this->itkImporter);
58 ConnectPipelines(this->itkExporter, this->vtkImporter);
59 this->LinkITKProgressToVTKProgress(m_Filter);
60
62 m_Filter->SetInput(this->itkImporter->GetOutput());
63 this->itkExporter->SetInput(m_Filter->GetOutput());
64 this->vtkCast->SetOutputScalarTypeToFloat();
65 };
66
68
69private:
71 void operator=(const vtkITKImageToImageFilterF2F&);
72};
73
74#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::Vector< float, 2 > InputImagePixelType
To/from ITK.
itk::Image< InputImagePixelType, 3 > InputImageType
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)