<div dir="ltr">Hello,<br>what exactly does not wrk as expected ?<br>Best regards,<br>Oliver<br><br><div class="gmail_quote">2008/7/28 P B <span dir="ltr">&lt;<a href="mailto:chose29@hotmail.com">chose29@hotmail.com</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">



<div><font size="2"><font size="2"><font size="2"><font size="2">Hi,</font></font></font></font><br>
&nbsp;<br>
&nbsp;&nbsp; could anyone tell me what&#39;s wrong in the usage of iterator in the following code? I&#39;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,<br>

&nbsp;<br>
Thanks!!<br>
Pascale<br>
&nbsp;<br>
<font size="2"><font size="2"><font size="2"><font size="2">in the following code, </font></font></font></font><font size="2"><font size="2"><font size="2"><font size="2">Image is a vtkImageData * :</font></font></font></font><br>

<font size="2"><font size="2"><font size="2"><font size="2">&nbsp;<br>
<font color="#000000">vtkImageIterator&lt;</font></font><font color="#000000"><font size="2">unsigned</font><font size="2"> </font><font size="2">short</font><font size="2">&gt; *it = </font><font size="2">new</font><font size="2"> vtkImageIterator&lt;</font><font size="2">unsigned</font><font size="2"> </font><font size="2">short</font><font size="2">&gt;(Image, ext);</font></font><br>
<font size="2"><font size="2"><font color="#000000"><font color="#008000" size="2">
<font color="#000000">unsigned short* Begin;</font><br>
<font color="#000000">while (!it-&gt;IsAtEnd())</font><br>
<font color="#000000">{</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; unsigned short* End = it-&gt;EndSpan();</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for( Begin = it-&gt;BeginSpan(); Begin != End; Begin++)</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val = (unsigned short)(*Begin);</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; val; </font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; it-&gt;NextSpan();</font><br>
<font color="#000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Count++;</font><br>
<font color="#000000">}</font><br></font></font></font><font size="2">
&nbsp;<br>
&nbsp;<br>
&nbsp;<br></font></font></font></font></font><br><hr> <a></a></div>
<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>