[ITK-users] Using Requested Regions with Filter

Matt McCormick matt.mccormick at kitware.com
Tue May 10 13:59:33 EDT 2016


Hi Aude,

The itk::HessianRecursiveGaussianImageFilter does not currently
support streaming:

  https://github.com/InsightSoftwareConsortium/ITK/blob/4944f06ca0d25d6fd23b7cef3c3da730ac26ff8f/Modules/Filtering/ImageFeature/include/itkHessianRecursiveGaussianImageFilter.hxx#L137-L154

so the pipeline will not stream.


Some options:

- Use an itk::RegionOfInterestImageFilter on the reader output.
- Implement a Hessian image filter that is capable of streaming.  The
itkDiscreteHessianGaussianImageFunction.{h,hxx} in the ITK Review
module may be useful.

HTH,
Matt

On Tue, May 10, 2016 at 10:19 AM, CHENET Aude (External)
<Aude.CHENET-ext at galderma.com> wrote:
> Hello,
>
>
>
> I’m using ITK (with Python wrapping) and I’d like to work only on a part of
> an image (because of memory problems)
>
> I’ve declared the requestedRegion for the output of my filter, but still
> have the memory problem.
>
> Do I have to declare something else to the filter?
>
>
>
> Here is my code :
>
>     pixelType = itk.SS
>
>     imageType = itk.Image[pixelType,3]
>
>     readerType = itk.ImageFileReader[imageType]
>
>     reader = readerType.New()
>
>     reader.SetFileName('resamp.tif')
>
>
>
>     imageResamp = reader.GetOutput()
>
>
>
>     idx = itk.Index[3]()
>
>     idx[1]=80
>
>     s = itk.Size[3]()
>
>     s[0]=1354
>
>     s[1]=20
>
>     s[2]=1440
>
>     region = itk.ImageRegion[3]()
>
>     region.SetIndex(idx)
>
>     region.SetSize(s)
>
>
>
>     imageResamp.SetBufferedRegion(region)
>
>     imageResamp.SetRequestedRegion(region)
>
>
>
>     h = itk.HessianRecursiveGaussianImageFilter[imageType].New()
>
>     h2v = itk.Hessian3DToVesselnessMeasureImageFilter[itk.SS].New()
>
>     h2v.SetInput(h.GetOutput())
>
>
>
>     h.SetInput(imageResamp)
>
>     h2v.GetOutput().SetRequestedRegion(region)
>
>     h2v.GetOutput().UpdateOutputInformation()
>
>     h2v.GetOutput().PropagateRequestedRegion()
>
>
>
>     h2v.Update()
>
>
>
>
>
> Thanks for your help.
>
>
>
> Aude
>
>
> _____________________________________
> 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 Insight-users mailing list