Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkITKImageToImageFilterUSF.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==========================================================================*/
9
10#ifndef vtkITKImageToImageFilterUSF_h
11#define vtkITKImageToImageFilterUSF_h
12
14#include "vtkImageAlgorithm.h"
15#include "itkImageToImageFilter.h"
16#include "itkVTKImageExport.h"
17#include "itkVTKImageImport.h"
18#include "vtkITKUtility.h"
19
21{
22public:
24 static vtkITKImageToImageFilterUSF* New() { return 0; };
25 void PrintSelf(ostream& os, vtkIndent indent)
26 {
27 Superclass::PrintSelf(os, indent);
28 os << m_Filter;
29 };
30
31protected:
33 typedef unsigned short InputImagePixelType;
34 typedef float OutputImagePixelType;
35 typedef itk::Image<InputImagePixelType, 3> InputImageType;
36 typedef itk::Image<OutputImagePixelType, 3> OutputImageType;
37
38 typedef itk::VTKImageImport<InputImageType> ImageImportType;
39 typedef itk::VTKImageExport<OutputImageType> ImageExportType;
40 ImageImportType::Pointer itkImporter;
41 ImageExportType::Pointer itkExporter;
42
43 typedef itk::ImageToImageFilter<InputImageType, OutputImageType> GenericFilterType;
44 GenericFilterType::Pointer m_Filter;
45
47 {
49 m_Filter = filter;
50 this->itkImporter = ImageImportType::New();
51 this->itkExporter = ImageExportType::New();
52 ConnectPipelines(this->vtkExporter, this->itkImporter);
53 ConnectPipelines(this->itkExporter, this->vtkImporter);
54 this->LinkITKProgressToVTKProgress(m_Filter);
55
57 m_Filter->SetInput(this->itkImporter->GetOutput());
58 this->itkExporter->SetInput(m_Filter->GetOutput());
59 this->vtkCast->SetOutputScalarTypeToUnsignedShort();
60 };
61
63
64private:
66 void operator=(const vtkITKImageToImageFilterUSF&);
67};
68
69#endif
itk::Image< OutputImagePixelType, 3 > OutputImageType
unsigned short InputImagePixelType
To/from ITK.
itk::VTKImageImport< InputImageType > ImageImportType
static vtkITKImageToImageFilterUSF * New()
itk::ImageToImageFilter< InputImageType, OutputImageType > GenericFilterType
itk::VTKImageExport< OutputImageType > ImageExportType
void PrintSelf(ostream &os, vtkIndent indent)
vtkITKImageToImageFilterUSF(GenericFilterType *filter)
GenericFilterType::Pointer m_Filter
itk::Image< InputImagePixelType, 3 > InputImageType
void LinkITKProgressToVTKProgress(itk::ProcessObject *process)
BTX.
void PrintSelf(ostream &os, vtkIndent indent) override
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)