[Insight-users] Compile fails for BinaryMorphologicalOpeningImageFilter
Luis Ibanez
luis.ibanez at kitware.com
Fri Oct 29 13:24:46 EDT 2010
Hi Denis,
Thanks for pointing out this bug.
A fix has now been pushed to the
Gerrit code review system:
http://review.source.kitware.com/#change,272
It should move swiftly into the git master branch of ITK...
Thanks
Luis
---------------------------------------------------------
On Wed, Oct 20, 2010 at 5:02 AM, Denis Shamonin <dshamoni at gmail.com> wrote:
> Dear all,
>
> The BinaryMorphologicalOpeningImageFilter class fails to compile for
> different input/output image types.
>
> typedef itk::Image<_TDataTypeIn, Dimension> InputImage;
> typedef itk::Image<_TDataTypeOut, Dimension> OutputImage;
> typedef itk::BinaryMorphologicalOpeningImageFilter<InputImage,
> OutputImage, KernelType>
>
> The reason is that inside
> BinaryMorphologicalOpeningImageFilter::GenerateData()
> dilate filter templated over TInputImage.
> dilate = BinaryDilateImageFilter< TInputImage, TInputImage, TKernel
> >::New();
>
> While erode templated over TInputImage, TOutputImage
> erode = BinaryErodeImageFilter< TInputImage, TOutputImage, TKernel
> >::New();
>
> And later erode is used as input for dilate.
>
> dilate->SetInput( erode->GetOutput() ); // COMPILE FAIL!
>
> I think you have to change it to:
> dilate = BinaryDilateImageFilter< TInputImage, TOutputImage, TKernel
> >::New();
>
> Same goes for BinaryMorphologicalClosingImageFilter, although it is
> compiling fine.
>
> Please fix it, Thanks.
>
> Denis Shamonin, MSc
> Division of Image Processing (LKEB)
> Department of Radiology
> Leiden University Medical Center
> PO Box 9600, 2300 RC Leiden, The Netherlands
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101029/02b62fcb/attachment.htm>
More information about the Insight-users
mailing list