<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.pln
        {mso-style-name:pln;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:70.85pt 70.85pt 70.85pt 70.85pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi Brad, others,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I am trying to convert my code to use the recently modified ImageRegionSplitter classes.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The migration guide + the header comments suggests that a simple change from<o:p></o:p></p>
<p class="MsoNormal"><span class="pln">itk::ImageRegionSplitter<Dim>::Pointer splitter;<o:p></o:p></span></p>
<p class="MsoNormal"><span class="pln">to<o:p></o:p></span></p>
<p class="MsoNormal"><span class="pln">itk::ImageRegionSplitterSlowDimension::Pointer splitter;<o:p></o:p></span></p>
<p class="MsoNormal">should be enough.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">However in my code it is not.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal">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.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The full signature used to be:<o:p></o:p></p>
<p class="MsoNormal">virtual RegionType GetSplit(unsigned int i,<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:36.0pt;text-indent:36.0pt">unsigned int numberOfPieces,<o:p></o:p></p>
<p class="MsoNormal"> const RegionType & region);<o:p></o:p></p>
<p class="MsoNormal">and now is:<o:p></o:p></p>
<p class="MsoNormal">unsigned int GetSplit( unsigned int i,<o:p></o:p></p>
<p class="MsoNormal"> unsigned int numberOfPieces,<o:p></o:p></p>
<p class="MsoNormal"> ImageRegion<VImageDimension> & region ) const<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I was expecting that the argument "region" is the full region, and that the function returns a new splitted region.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">How do I get the splitted region from the new function?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards, Marius<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Marius Staring, PhD<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Division of Image Processing (LKEB)<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Department of Radiology<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Leiden University Medical Center<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">PO Box 9600, 2300 RC Leiden, The Netherlands<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">phone: +31 (0)71 526 2137, fax: +31 (0)71 524 8256<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">m.staring@lumc.nl<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>