ah yes,sorry.<div><br></div><div>Here's the new paste: <a href="http://pastebin.com/miMz8xt0">http://pastebin.com/miMz8xt0</a></div><div><br></div><div>(though it is still 73 lines, but I don't know where it goes wrong, so I don't know what to put in and what to leave out)</div>
<div><br clear="all"><div><em>Wyke Huizinga</em></div>
<div><br></div><br>
<br><br><div class="gmail_quote">2012/11/2 David Doria <span dir="ltr"><<a href="mailto:daviddoria@gmail.com" target="_blank">daviddoria@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Fri, Nov 2, 2012 at 5:31 AM, Wyke Huizinga <<a href="mailto:wykehuizinga@gmail.com">wykehuizinga@gmail.com</a>> wrote:<br>
> Hi,<br>
>><br>
>><br>
>> I'm having a problem with the image iterator.<br>
>> I want to iterate over a specific volume in a 4D image.<br>
>> What I do is the following:<br>
>><br>
>> I loop over the volumes in the 4D image. Each new loop the region for the<br>
>> image iterator changes.<br>
>> The region is put into a function which should iterate then over the<br>
>> specific volume.<br>
>><br>
>> The region size is set to the size of a volume and the size of the 4th<br>
>> dimension is set to 0 (in this case: [79 107 60 0])<br>
>> The region index is set to [0 0 0 loopindex].<br>
>><br>
>> Both the region and the image are passed in correctly into the function.<br>
>><br>
>> However, the iterator says it is at its end before even starting the loop.<br>
>> The code can be found here: <a href="http://pastebin.com/PArvffSq" target="_blank">http://pastebin.com/PArvffSq</a><br>
>> It goes wrong at line 55.<br>
>><br>
>> I'm a bit of a newby in both ITK and C++, so forgive me if the code looks<br>
>> bad.<br>
>><br>
>> Thanks for your help,<br>
>><br>
>><br>
>> Wyke Huizinga<br>
<br>
</div></div>Please create the smallest possible, stand alone, compilable example.<br>
For example, replace the input image with a hard coded image. Remove<br>
all of the random number generation, etc. It is much more manageable<br>
for us to step through 20 lines than 130.<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br></div>