Difference between revisions of "ITK/Examples/WishList/VectorImages/VectorImageResampleImageFilter"

From KitwarePublic
< ITK‎ | Examples
Jump to: navigation, search
(Unused args)
(Deprecated content that is moved to sphinx)
 
Line 1: Line 1:
==VectorImageResampleImageFilter.cxx==
+
{{warning|1=The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/*  pages likely require ITK version 4.13 or earlier releasesIn many cases, the examples on this page no longer conform to the best practices for modern ITK versions.}}
<source lang="cpp">
 
#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;
 
}
 
 
 
</source>
 
 
 
{{ITKCMakeLists|{{SUBPAGENAME}}}}
 

Latest revision as of 18:36, 7 June 2019

Warning: The media wiki content on this page is no longer maintained. The examples presented on the https://itk.org/Wiki/* pages likely require ITK version 4.13 or earlier releases. In many cases, the examples on this page no longer conform to the best practices for modern ITK versions.