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
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
20
22{
23public:
25 static vtkITKImageToImageFilterUSF* New() { return 0; };
26 void PrintSelf(ostream& os, vtkIndent indent)
27 {
28 Superclass::PrintSelf ( os, indent );
29 os << m_Filter;
30 };
31
32protected:
33
35 typedef unsigned short InputImagePixelType;
36 typedef float OutputImagePixelType;
37 typedef itk::Image<InputImagePixelType, 3> InputImageType;
38 typedef itk::Image<OutputImagePixelType, 3> OutputImageType;
39
40 typedef itk::VTKImageImport<InputImageType> ImageImportType;
41 typedef itk::VTKImageExport<OutputImageType> ImageExportType;
42 ImageImportType::Pointer itkImporter;
43 ImageExportType::Pointer itkExporter;
44
45 typedef itk::ImageToImageFilter<InputImageType,OutputImageType> GenericFilterType;
46 GenericFilterType::Pointer m_Filter;
47
49 {
51 m_Filter = filter;
52 this->itkImporter = ImageImportType::New();
53 this->itkExporter = ImageExportType::New();
54 ConnectPipelines(this->vtkExporter, this->itkImporter);
55 ConnectPipelines(this->itkExporter, this->vtkImporter);
56 this->LinkITKProgressToVTKProgress ( m_Filter );
57
59 m_Filter->SetInput ( this->itkImporter->GetOutput() );
60 this->itkExporter->SetInput ( m_Filter->GetOutput() );
61 this->vtkCast->SetOutputScalarTypeToUnsignedShort();
62 };
63
67
68private:
70 void operator=(const vtkITKImageToImageFilterUSF&);
71};
72
73#endif
itk::Image< OutputImagePixelType, 3 > OutputImageType
unsigned short InputImagePixelType
To/from ITK.
itk::VTKImageImport< InputImageType > ImageImportType
itk::ImageToImageFilter< InputImageType, OutputImageType > GenericFilterType
static vtkITKImageToImageFilterUSF * New()
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)