Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkITKImageToImageFilterUSUL.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 __vtkITKImageToImageFilterUSUL_h
16#define __vtkITKImageToImageFilterUSUL_h
17
18#include "vtkImageAlgorithm.h"
20#include "itkImageToImageFilter.h"
21#include "itkVTKImageExport.h"
22#include "itkVTKImageImport.h"
23#include "vtkITKUtility.h"
24
26{
27public:
29 static vtkITKImageToImageFilterUSUL* 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::Image<unsigned short, 3> InputImageType;
39 typedef itk::Image<unsigned long, 3> OutputImageType;
40
41 typedef itk::VTKImageImport<InputImageType> ImageImportType;
42 typedef itk::VTKImageExport<OutputImageType> ImageExportType;
43 ImageImportType::Pointer itkImporter;
44 ImageExportType::Pointer itkExporter;
45
46 typedef itk::ImageToImageFilter<InputImageType, OutputImageType> FilterType;
47 FilterType::Pointer m_Filter;
48
50 {
52 m_Filter = filter;
53 this->itkImporter = ImageImportType::New();
54 this->itkExporter = ImageExportType::New();
55 ConnectPipelines(this->vtkExporter, this->itkImporter);
56 ConnectPipelines(this->itkExporter, this->vtkImporter);
57 this->LinkITKProgressToVTKProgress(m_Filter);
59 m_Filter->SetInput(this->itkImporter->GetOutput());
60 this->itkExporter->SetInput(m_Filter->GetOutput());
61 this->vtkCast->SetOutputScalarTypeToUnsignedShort();
62 };
63
65
66private:
68 void operator=(const vtkITKImageToImageFilterUSUL&);
69};
70
71#endif
itk::ImageToImageFilter< InputImageType, OutputImageType > FilterType
itk::Image< unsigned long, 3 > OutputImageType
itk::Image< unsigned short, 3 > InputImageType
To/from ITK.
itk::VTKImageExport< OutputImageType > ImageExportType
void PrintSelf(ostream &os, vtkIndent indent)
static vtkITKImageToImageFilterUSUL * New()
itk::VTKImageImport< InputImageType > ImageImportType
void LinkITKProgressToVTKProgress(itk::ProcessObject *process)
BTX.
void PrintSelf(ostream &os, vtkIndent indent) override
void ConnectPipelines(ITK_Exporter exporter, VTK_Importer *importer)