[ITK-users] SliceBySliceImageFilter

Jonas Teuwen jonasteuwen at gmail.com
Mon Jul 31 15:55:40 EDT 2017


Hi all,

I have 3D images on which I apply a collection of filters slice-by-slice. I
discovered the 'SliceBySliceImageFilter'.

The 2D filter contains things such as, after I read the 2D images:

typedef itk::FlatStructuringElement< Dimension >
    StructuringElementType;
  StructuringElementType::RadiusType radius;
  radius.Fill( radiusValue );
  StructuringElementType structuringElement =
    StructuringElementType::Annulus(radius, outerRadius, false, false);

  typedef itk::GrayscaleDilateImageFilter< FloatImageType, ImageType,
    StructuringElementType > GrayscaleDilateImageFilterType;
  GrayscaleDilateImageFilterType::Pointer dilateFilter =
    GrayscaleDilateImageFilterType::New();
  dilateFilter->SetInput( reader ->GetOutput() );
  dilateFilter->SetKernel( structuringElement );
  //dilateOutput = dilateFilter->GetOutput();

  typedef itk::MinimumImageFilter <ImageType>
    MinimumImageFilterType;
  MinimumImageFilterType::Pointer minimumImageFilter
    = MinimumImageFilterType::New ();
  minimumImageFilter->SetInput(0, reader->GetOutput());
  minimumImageFilter->SetInput(1, dilateFilter->GetOutput());
  minimumImageFilter->Update();


then I have the output in minimumImageFilter->GetOutput();

However, when I apply SliceBySlice Image filter, my reader is the one of a
3D image, but the minimum filter also uses the reader->GetOutput() which
has to be in 2D.

How do approach this problem?

Best,
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20170731/899faecb/attachment.html>


More information about the Insight-users mailing list