ITK/Examples/Math/Trig/SinImageFilter: Difference between revisions

From KitwarePublic
< ITK‎ | Examples
Jump to navigationJump to search
No edit summary
(Deprecated content that is moved to sphinx)
 
Line 1: Line 1:
==SinImageFilter.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 releases.   In 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 "itkSinImageFilter.h"


typedef itk::Image<float, 2>  FloatImageType;
[https://itk.org/ITKExamples[ITK Sphinx Examples]]
 
static void CreateImage(FloatImageType::Pointer image);
 
int main(int, char *[])
{
  FloatImageType::Pointer image = FloatImageType::New();
  CreateImage(image);
 
  // Compute the sine of each pixel
  typedef itk::SinImageFilter <FloatImageType, FloatImageType>
          SinImageFilterType;
 
  SinImageFilterType::Pointer sinImageFilter = SinImageFilterType::New ();
  sinImageFilter->SetInput(image);
  sinImageFilter->Update();
 
  return EXIT_SUCCESS;
}
 
void CreateImage(FloatImageType::Pointer image)
{
  FloatImageType::IndexType start;
  start.Fill(0);
 
  FloatImageType::SizeType size;
  size.Fill(10);
 
  FloatImageType::RegionType region(start,size);
  image->SetRegions(region);
  image->Allocate();
  image->FillBuffer(0);
 
}
 
</source>
 
{{ITKCMakeLists|{{SUBPAGENAME}}}}

Latest revision as of 21:18, 30 May 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.

[ITK Sphinx Examples]