[ITK] [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/community/attachments/20170731/899faecb/attachment.html>
-------------- next part --------------
_____________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://www.kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/insight-users


More information about the Community mailing list