[Insight-developers] imageregionsplitter migration

M.Staring at lumc.nl M.Staring at lumc.nl
Wed Apr 17 03:58:50 EDT 2013


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

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


More information about the Insight-developers mailing list