Hi Michael,<br><br>you might consider using itk::ImageRegionConstIterator instead.<br><br>Cheers,<br><br>Frederic Perez<br><br><div class="gmail_quote">On Fri, Oct 2, 2009 at 3:05 PM, Michael Xanadu <span dir="ltr"><<a href="mailto:xanadu.michael@googlemail.com">xanadu.michael@googlemail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi,<br><br>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:<br>
<br>template <class TImageType, class TOutputType><br>
void ContourArrayFilter<TImageType, TOutputType>::GenerateData()<br>{<br> typedef itk::ImageRegionIterator< TImageType > IteratorType;<br> IteratorType iterator( this->GetInput(), this->GetInput()->GetLargestPossibleRegion());<br>
//...<br>}<br><br>But this->GetInput() delivers a const Pointer while the iterator needs a normal one. So I get:<br><br>cannot convert parameter 1 from 'const itk::Image<TPixel,VImageDimension> *' to 'itk::Image<TPixel,VImageDimension> *'<br>
<br>Does anybody know how to solve the problem? I just wanna iterate the pixels of the input.<br><br><br>Refards, Michael <br><br>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at: <a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br>