VMTK
Loading...
Searching...
No Matches
vtkvmtkNormalizeImageFilter.cxx
Go to the documentation of this file.
1/*=========================================================================
2
3Program: VMTK
4Module: $RCSfile: vtkvmtkNormalizeImageFilter.cxx,v $
5Language: C++
6Date: $Date: 2006/04/06 16:48:25 $
7Version: $Revision: 1.1 $
8
9 Copyright (c) Luca Antiga, David Steinman. All rights reserved.
10 See LICENSE file for details.
11
12 Portions of this code are covered under the VTK copyright.
13 See VTKCopyright.txt or http://www.kitware.com/VTKCopyright.htm
14 for details.
15
16 Portions of this code are covered under the ITK copyright.
17 See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm
18 for details.
19
20 This software is distributed WITHOUT ANY WARRANTY; without even
21 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
22 PURPOSE. See the above copyright notices for more information.
23
24=========================================================================*/
25
27#include "vtkImageData.h"
28#include "vtkObjectFactory.h"
29
31
32#include "itkNormalizeImageFilter.h"
33
34
36
40
44
45void vtkvmtkNormalizeImageFilter::SimpleExecute(vtkImageData *input, vtkImageData *output)
46{
47 typedef float PixelType;
48 const int Dimension = 3;
49 typedef itk::Image<PixelType, Dimension> ImageType;
50
51 ImageType::Pointer inImage = ImageType::New();
52
54
55 typedef itk::NormalizeImageFilter<ImageType, ImageType> NormalizeFilterType;
56
57 NormalizeFilterType::Pointer imageFilter = NormalizeFilterType::New();
58 imageFilter->SetInput(inImage);
59 imageFilter->Update();
60
61 ImageType::Pointer outputImage = imageFilter->GetOutput();
62
64}
65
static void ITKToVTKImage(typename TImage::Pointer input, vtkImageData *output)
static void VTKToITKImage(vtkImageData *input, typename TImage::Pointer output)
Wraps itk::NormalizeImageFilter.
virtual void SimpleExecute(vtkImageData *input, vtkImageData *output) override
vtkStandardNewMacro(vtkvmtkNormalizeImageFilter)