[Insight-users] drawing a line

LaMoOsH .. xlolla28x at hotmail.com
Thu Apr 21 10:50:47 EDT 2011


Hello, 
 
I am new to itk, and trying to draw a line between two points.
 
typedef itk::LineConstIterator< OutputImageType > LineIteratorType;
LineIteratorType it( reader, (170.910,144.438),(170.910,450.510) );
it.GoToBegin();
while (!it.IsAtEnd())
{
std::cout << (float)it.Get() << std::endl;
++it;
}
 
can I know what is wring with this code?
the error is 
 
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> *'
 
i think the way im writing the points might be wrong. not sure.
my reader a reader to an image already defined before and the pixel is of type float. 
output image type is the output of another function that was applied on my image. 
 
hope i get some help.
 
Thank you.   		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110421/aac402db/attachment.htm>


More information about the Insight-users mailing list