ITK/Release 4/Why Switch to ITKv4/SimplifiedITK/DiscreteGaussianFilter

From KitwarePublic
< ITK‎ | Release 4‎ | Why Switch to ITKv4‎ | SimplifiedITK
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; ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

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>

WrapITK