Resample A Vector Image

Note

Wish List Still needs additional work to finish proper creation of example.

Synopsis

Resample an itk::VectorImage.

Results

Note

Help Wanted Implementation of Results for sphinx examples containing this message. Reconfiguration of CMakeList.txt may be necessary. Write An Example <https://itk.org/ITKExamples/Documentation/Contribute/WriteANewExample.html>

Code

C++

/*
#include "itkImage.h"
#include "itkVectorResampleImageFilter.h"
#include "itkVectorImage.h"

int main(int, char *[])
{
  typedef itk::VectorImage<double, 2> VectorImageType;

  VectorImageType::Pointer image = VectorImageType::New();
  itk::Index<2> start;
  start.Fill(0);

  itk::Size<2> size;
  size.Fill(10);

  itk::ImageRegion<2> region(start,size);
  image->SetRegions(region);
  image->SetNumberOfComponentsPerPixel(3);
  image->Allocate();
  image->FillBuffer(itk::NumericTraits<VectorImageType::InternalPixelType>::Zero);

  typedef itk::VectorResampleImageFilter< VectorImageType, VectorImageType > VectorResampleFilterType;
  VectorResampleFilterType::Pointer vectorResampleFilter = VectorResampleFilterType::New();
  vectorResampleFilter->SetInput(image);
  vectorResampleFilter->Update();

  return EXIT_SUCCESS;
}

Classes demonstrated