ITK  5.2.0
Insight Toolkit
SphinxExamples/src/Compatibility/Deprecated/ResampleITKVectorImage/Code.cxx
/*=========================================================================
*
* Copyright NumFOCUS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0.txt
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*=========================================================================*/
#include "itkImage.h"
#include "itkVectorImage.h"
int
main(int, char *[])
{
using VectorImageType = itk::VectorImage<double, 2>;
VectorImageType::Pointer image = VectorImageType::New();
start.Fill(0);
size.Fill(10);
itk::ImageRegion<2> region(start, size);
image->SetRegions(region);
image->SetNumberOfComponentsPerPixel(3);
image->Allocate();
// image->FillBuffer(itk::NumericTraits<VectorImageType::InternalPixelType>::Zero);
ResampleFilterType::Pointer vectorResampleFilter = ResampleFilterType::New();
vectorResampleFilter->SetInput(image);
vectorResampleFilter->Update();
return EXIT_SUCCESS;
}
itk::Index
Represent a n-dimensional index in a n-dimensional image.
Definition: itkIndex.h:66
itk::Size< 2 >
itk::ImageRegion
An image region represents a structured region of data.
Definition: itkImageRegion.h:69
itk::VectorImage
Templated n-dimensional vector image class.
Definition: itkImageAlgorithm.h:29
itkImage.h
itk::Index::Fill
void Fill(IndexValueType value)
Definition: itkIndex.h:270
itk::Size::Fill
void Fill(SizeValueType value)
Definition: itkSize.h:211
itkVectorImage.h
itk::ResampleImageFilter
Resample an image via a coordinate transform.
Definition: itkResampleImageFilter.h:90
itkResampleImageFilter.h