[Insight-users] ImageRegionIterator inside ImageToImageFilter

Michael Xanadu xanadu.michael at googlemail.com
Fri Oct 2 09:05:08 EDT 2009


Hi,

i wanna write my own filter dereived from ImageToImageFilter. In
GenerateData() i want to use an ImageRegionIterator, which shall get the
Input of the filter:

template <class TImageType, class TOutputType>
void ContourArrayFilter<TImageType, TOutputType>::GenerateData()
{
    typedef itk::ImageRegionIterator< TImageType > IteratorType;
    IteratorType iterator( this->GetInput(),
this->GetInput()->GetLargestPossibleRegion());
    //...
}

But this->GetInput() delivers a const Pointer while the iterator needs a
normal one. So I get:

cannot convert parameter 1 from 'const itk::Image<TPixel,VImageDimension> *'
to 'itk::Image<TPixel,VImageDimension> *'

Does anybody know how to solve the problem? I just wanna iterate the pixels
of the input.


Refards, Michael
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20091002/00ca7d31/attachment.htm>


More information about the Insight-users mailing list