[Insight-users] drawing a line
LaMoOsH ..
xlolla28x at hotmail.com
Thu Apr 21 14:30:42 EDT 2011
hi,
great ! it was built. I didnt create a new image, just added the pointer to my image .
But now , i cant debug this
it breaks on
std::cout <<(float)iterator.Get() << std::endl;
why?
and I cant add image to my pipeline
when i add it i get this error
error C2039: 'SetInput' : is not a member of 'itk::Image<TPixel,VImageDimension>
thanks
Date: Thu, 21 Apr 2011 13:38:01 -0400
Subject: Re: [Insight-users] drawing a line
From: daviddoria at gmail.com
To: xlolla28x at hotmail.com
CC: insight-users at itk.org
2011/4/21 LaMoOsH .. <xlolla28x at hotmail.com>
Hi,
Thank you for your help !
I did what u told me .. and I still get the same error
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> *'
how can I fix it ?
thanks
This builds fine for me:
#include <iostream>
#include "itkLineConstIterator.h"
int main(int argc, char *argv[])
{
typedef itk::Image<unsigned char, 2> ImageType;
ImageType::Pointer image = ImageType::New();
typedef itk::LineConstIterator< ImageType > LineIteratorType;
ImageType::IndexType point0;
point0[0] = 170.91;
point0[1] = 144.438;
ImageType::IndexType point1;
point1[0] = 170.91;
point1[1] = 450.510;
LineIteratorType it( image, point0, point1);
it.GoToBegin();
while (!it.IsAtEnd())
{
std::cout << (float)it.Get() << std::endl;
++it;
}
return EXIT_SUCCESS;
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20110421/86357edf/attachment.htm>
More information about the Insight-users
mailing list