<div class="gmail_quote">2011/4/21 LaMoOsH .. <span dir="ltr">&lt;<a href="mailto:xlolla28x@hotmail.com">xlolla28x@hotmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">




<div>
Hi, <br>
 <br>
Thank you for your help !<br>
 <br>
I did what u told me .. and I still get the same error <br><div class="im">
 <br><font size="1">
<font size="2">error C2664: &#39;itk::LineConstIterator&lt;TImage&gt;::LineConstIterator(const itk::Image&lt;TPixel,VImageDimension&gt; *,const itk::Index&lt;VIndexDimension&gt; &amp;,const itk::Index&lt;VIndexDimension&gt; &amp;)&#39; : cannot convert parameter 1 from &#39;itk::SmartPointer&lt;TObjectType&gt;&#39; to &#39;const itk::Image&lt;TPixel,VImageDimension&gt; *&#39;</font><br>

 <br>
</font></div>how can I fix it ?<br>
 <br>
thanks <br></div></blockquote><div><br>This builds fine for me:<br><br>#include &lt;iostream&gt;<br><br>#include &quot;itkLineConstIterator.h&quot;<br><br>int main(int argc, char *argv[])<br>{  <br>  typedef itk::Image&lt;unsigned char, 2&gt; ImageType;<br>
  ImageType::Pointer image = ImageType::New();<br>  <br>  typedef itk::LineConstIterator&lt; ImageType &gt; LineIteratorType;<br>  ImageType::IndexType point0;<br>  point0[0] = 170.91;<br>  point0[1] = 144.438;<br>  <br>  ImageType::IndexType point1;<br>
  point1[0] = 170.91;<br>  point1[1] = 450.510;<br>  <br>  LineIteratorType it( image, point0, point1);<br>  it.GoToBegin();<br>  while (!it.IsAtEnd())<br>    {<br>    std::cout &lt;&lt; (float)it.Get() &lt;&lt; std::endl;<br>
    ++it;<br>    }<br><br>  return EXIT_SUCCESS;<br>}<br> </div></div>