Hi Denis,<br><br>Thanks for pointing out this bug.<br><br>A fix has now been pushed to the <br>Gerrit code review system:<br><br><a href="http://review.source.kitware.com/#change,272">http://review.source.kitware.com/#change,272</a><br>
<br>It should move swiftly into the git master branch of ITK...<br><br><br>     Thanks<br><br><br>          Luis<br><br><br>---------------------------------------------------------<br><div class="gmail_quote">On Wed, Oct 20, 2010 at 5:02 AM, Denis Shamonin <span dir="ltr">&lt;<a href="mailto:dshamoni@gmail.com">dshamoni@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Dear all,<br>
<br>
The BinaryMorphologicalOpeningImageFilter class fails to compile for<br>
different input/output image types.<br>
<br>
typedef itk::Image&lt;_TDataTypeIn, Dimension&gt; InputImage;<br>
typedef itk::Image&lt;_TDataTypeOut, Dimension&gt; OutputImage;<br>
typedef itk::BinaryMorphologicalOpeningImageFilter&lt;InputImage,<br>
OutputImage, KernelType&gt;<br>
<br>
The reason is that inside BinaryMorphologicalOpeningImageFilter::GenerateData()<br>
dilate filter templated over TInputImage.<br>
dilate = BinaryDilateImageFilter&lt; TInputImage, TInputImage, TKernel &gt;::New();<br>
<br>
While erode templated over TInputImage, TOutputImage<br>
erode = BinaryErodeImageFilter&lt; TInputImage, TOutputImage, TKernel &gt;::New();<br>
<br>
And later erode is used as input for dilate.<br>
<br>
dilate-&gt;SetInput( erode-&gt;GetOutput() ); // COMPILE FAIL!<br>
<br>
I think you have to change it to:<br>
dilate = BinaryDilateImageFilter&lt; TInputImage, TOutputImage, TKernel &gt;::New();<br>
<br>
Same goes for BinaryMorphologicalClosingImageFilter, although it is<br>
compiling fine.<br>
<br>
Please fix it, Thanks.<br>
<br>
Denis Shamonin, MSc<br>
Division of Image Processing (LKEB)<br>
Department of Radiology<br>
Leiden University Medical Center<br>
PO Box 9600, 2300 RC Leiden, The Netherlands<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>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href="http://www.kitware.com/products/protraining.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<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>
</blockquote></div><br>