ITK/Release 4/Why Switch to ITKv4/SimplifiedITK/DiscreteGaussianFilter
From KitwarePublic
< ITK | Release 4 | Why Switch to ITKv4 | SimplifiedITK
Jump to navigationJump to search
Revision as of 22:48, 30 August 2011 by Matt.mccormick (talk | contribs) (Created page with "=== C++ === <source lang="cpp"> // Setup image types. typedef float InputPixelType; typedef float OutputPixelType; typedef itk::Image<InputPixelType, 2> InputImageType; ...")
C++
<source lang="cpp">
// Setup image types. typedef float InputPixelType; typedef float OutputPixelType; typedef itk::Image<InputPixelType, 2> InputImageType; typedef itk::Image<OutputPixelType,2> OutputImageType; // Filter type typedef itk::DiscreteGaussianImageFilter< InputImageType, OutputImageType > FilterType; // Create a filter FilterType::Pointer filter = FilterType::New(); // Create the pipeline filter->SetInput( reader->GetOutput() ); filter->SetVariance( 1.0 ); filter->SetMaximumKernelWidth( 5 ); filter->Update(); OutputImageType::Pointer blurred = filter->GetOutput();
</source>