[Insight-developers] imageregionsplitter migration

M.Staring at lumc.nl M.Staring at lumc.nl
Wed Apr 17 08:34:04 EDT 2013


Hi Brad,

Thanks, that seems to do the trick.

Regards, Marius

From: Bradley Lowekamp [mailto:blowekamp at mail.nih.gov]
Sent: woensdag 17 april 2013 14:22
To: Staring, M. (LKEB)
Cc: insight-developers at itk.org
Subject: Re: [Insight-developers] imageregionsplitter migration

Hello Marius,

The region argument is taken as the largest region as input and is modified in place to become the splitted region as output. A similar change to what you need was made in the ImageStreamingFilter here:

https://github.com/Kitware/ITK/commit/d84ddc8a8b72f39a07bd4e76e136e046168e28bb#L2L21

Brad


On Apr 17, 2013, at 3:58 AM, m.staring at lumc.nl<mailto:m.staring at lumc.nl> wrote:


Hi Brad, others,

I am trying to convert my code to use the recently modified ImageRegionSplitter classes.

The migration guide + the header comments suggests that a simple change from
itk::ImageRegionSplitter<Dim>::Pointer splitter;
to
itk::ImageRegionSplitterSlowDimension::Pointer splitter;
should be enough.

However in my code it is not.
I used typedefs from the now deprecated class, that are not in the new class. For example the RegionType and SizeType. I was able to work around that by adding my own typedefs for these things.
Secondly, the function signature of GetSplit changed. Previously it returned a new splitted region, but now it returns an unsigned int. I am not sure how to use this function.

The full signature used to be:
virtual RegionType GetSplit(unsigned int i,
unsigned int numberOfPieces,
                                const RegionType & region);
and now is:
unsigned int GetSplit( unsigned int i,
                           unsigned int numberOfPieces,
                           ImageRegion<VImageDimension> & region ) const

I was expecting that the argument "region" is the full region, and that the function returns a new splitted region.

How do I get the splitted region from the new function?

Regards, Marius

Marius Staring, PhD
Division of Image Processing (LKEB)
Department of Radiology
Leiden University Medical Center
PO Box 9600, 2300 RC Leiden, The Netherlands
phone: +31 (0)71 526 2137, fax: +31 (0)71 524 8256
m.staring at lumc.nl<mailto:m.staring at lumc.nl>

_______________________________________________
Powered by www.kitware.com<http://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://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://www.itk.org/mailman/listinfo/insight-developers

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-developers/attachments/20130417/a116f937/attachment.htm>


More information about the Insight-developers mailing list