[vtkusers] vtkImageIterator

Oliver Kania ptw.freiburg at googlemail.com
Tue Jul 29 03:51:50 EDT 2008


Hello,
what exactly does not wrk as expected ?
Best regards,
Oliver

2008/7/28 P B <chose29 at hotmail.com>

> Hi,
>
>    could anyone tell me what's wrong in the usage of iterator in the
> following code? I've been trying to use image iterators but am not sure if I
> have implementation problems or if the problem is elsewhere, with the
> creation of a transformed images that I want to output,
>
> Thanks!!
> Pascale
>
> in the following code, Image is a vtkImageData * :
>
> vtkImageIterator<unsigned short> *it = new vtkImageIterator<unsigned short>(Image,
> ext);
> unsigned short* Begin;
> while (!it->IsAtEnd())
> {
>       unsigned short* End = it->EndSpan();
>       for( Begin = it->BeginSpan(); Begin != End; Begin++)
>       {
>             val = (unsigned short)(*Begin);
>             val;
>       }
>       it->NextSpan();
>       Count++;
> }
>
>
>
>
> ------------------------------
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080729/c94e0e4b/attachment.htm>


More information about the vtkusers mailing list