ITK  5.0.0
Insight Segmentation and Registration Toolkit
WikiExamples/VectorImages/VectorResampleImageFilter.cxx
#include "itkImage.h"
int main(int, char *[])
{
using VectorImageType = itk::Image<VectorType, 2>;
VectorImageType::Pointer image = VectorImageType::New();
start.Fill(0);
size.Fill(10);
itk::ImageRegion<2> region(start,size);
image->SetRegions(region);
image->Allocate();
image->FillBuffer(itk::NumericTraits<VectorType>::Zero);
translation[0] = 10;
translation[1] = 20;
transform->Translate(translation);
VectorResampleFilterType::Pointer vectorResampleFilter = VectorResampleFilterType::New();
vectorResampleFilter->SetInput(image);
vectorResampleFilter->SetSize(image->GetLargestPossibleRegion().GetSize());
vectorResampleFilter->SetTransform(transform);
vectorResampleFilter->Update();
return EXIT_SUCCESS;
}