<div class="gmail_quote">2011/4/21 LaMoOsH .. <span dir="ltr"><<a href="mailto:xlolla28x@hotmail.com">xlolla28x@hotmail.com</a>></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: 'itk::LineConstIterator<TImage>::LineConstIterator(const itk::Image<TPixel,VImageDimension> *,const itk::Index<VIndexDimension> &,const itk::Index<VIndexDimension> &)' : cannot convert parameter 1 from 'itk::SmartPointer<TObjectType>' to 'const itk::Image<TPixel,VImageDimension> *'</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 <iostream><br><br>#include "itkLineConstIterator.h"<br><br>int main(int argc, char *argv[])<br>{ <br> typedef itk::Image<unsigned char, 2> ImageType;<br>
ImageType::Pointer image = ImageType::New();<br> <br> typedef itk::LineConstIterator< ImageType > 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 << (float)it.Get() << std::endl;<br>
++it;<br> }<br><br> return EXIT_SUCCESS;<br>}<br> </div></div>