<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
hi, <BR>
<BR>
great ! it was built. I didnt create a new image, just added the pointer to my image .<BR>
<BR>
But now , i cant debug this <BR>
it breaks on <BR><FONT size=2>
std::cout <<(</FONT><FONT color=#0000ff size=2><FONT color=#0000ff size=2>float</FONT></FONT><FONT size=2>)iterator.Get() << std::endl;<BR>
</FONT>why?<BR>
and I cant add image to my pipeline <BR>
when i add it i get this error <BR>
<BR><FONT size=1>
<FONT size=2>error C2039: 'SetInput' : is not a member of 'itk::Image<TPixel,VImageDimension></FONT><BR>
<FONT size=2></FONT> <BR>
<FONT size=2>thanks</FONT><BR>
</FONT><BR> <BR>
<HR id=stopSpelling>
Date: Thu, 21 Apr 2011 13:38:01 -0400<BR>Subject: Re: [Insight-users] drawing a line<BR>From: daviddoria@gmail.com<BR>To: xlolla28x@hotmail.com<BR>CC: insight-users@itk.org<BR><BR>
<DIV class=ecxgmail_quote>2011/4/21 LaMoOsH .. <SPAN dir=ltr><<A href="mailto:xlolla28x@hotmail.com">xlolla28x@hotmail.com</A>></SPAN><BR>
<BLOCKQUOTE class=ecxgmail_quote style="PADDING-LEFT: 1ex; BORDER-LEFT: #ccc 1px solid">
<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=ecxim> <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>                                            </body>
</html>