[Insight-users] image region iterator

Wyke Huizinga wykehuizinga at gmail.com
Fri Nov 2 07:41:37 EDT 2012


ah yes,sorry.

Here's the new paste: http://pastebin.com/miMz8xt0

(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)

*Wyke Huizinga*




2012/11/2 David Doria <daviddoria at gmail.com>

> On Fri, Nov 2, 2012 at 5:31 AM, Wyke Huizinga <wykehuizinga at gmail.com>
> wrote:
> > Hi,
> >>
> >>
> >> I'm having a problem with the image iterator.
> >> I want to iterate over a specific volume in a 4D image.
> >> What I do is the following:
> >>
> >> I loop over the volumes in the 4D image. Each new loop the region for
> the
> >> image iterator changes.
> >> The region is put into a function which should iterate then over the
> >> specific volume.
> >>
> >> The region size is set to the size of a volume and the size of the 4th
> >> dimension is set to 0 (in this case: [79 107 60 0])
> >> The region index is set to [0 0 0 loopindex].
> >>
> >> Both the region and the image are passed in correctly into the function.
> >>
> >> However, the iterator says it is at its end before even starting the
> loop.
> >> The code can be found here: http://pastebin.com/PArvffSq
> >> It goes wrong at line 55.
> >>
> >> I'm a bit of a newby in both ITK and C++, so forgive me if the code
> looks
> >> bad.
> >>
> >> Thanks for your help,
> >>
> >>
> >> Wyke Huizinga
>
> Please create the smallest possible, stand alone, compilable example.
> For example, replace the input image with a hard coded image. Remove
> all of the random number generation, etc. It is much more manageable
> for us to step through 20 lines than 130.
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20121102/0bbce83e/attachment.htm>


More information about the Insight-users mailing list