[Insight-users] bug in itkOptGrayscaleMorphologicalClosingImageFilter.txx ?
Luis Ibanez
luis.ibanez at kitware.com
Mon Sep 20 17:38:23 EDT 2010
Hi Oleksander,
1) What ITK version are you using ?
2) Please note that you must configure ITK with
ITK_USE_CONSOLIDATED_MORPHOLOGY
set to ON, in order to use that class.
Regards,
Luis
----------------------------------------------------------------
On Fri, Sep 17, 2010 at 4:50 PM, Oleksandr Dzyubak <adzyubak at gmail.com>wrote:
>
> Dear IT users,
>
> I just tried to compile the example from ITK
> itkMapOptGrayscaleMorphologicalClosingImageFilterTest.cxx
> and got a compilation error below.
>
>
> **********
> dzyubak at debian-alex: /BUILD$ make
> [100%] Building CXX object
> CMakeFiles/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.dir/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.cxx.o
> In file included from
> /usr/local/include/InsightToolkit/Review/itkOptGrayscaleMorphologicalClosingImageFilter.txx:20,
> from
> /usr/local/include/InsightToolkit/Review/itkOptGrayscaleMorphologicalClosingImageFilter.h:159,
> from
> /mnt/Public/Programs/ITK_Test/Morphology/Consolidated_morphology/Closing/2D/Src/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.cxx:22:
> /usr/local/include/InsightToolkit/BasicFilters/itkGrayscaleMorphologicalClosingImageFilter.h:56:
> error: redefinition of ‘class
> itk::GrayscaleMorphologicalClosingImageFilter<TInputImage, TOutputImage,
> TKernel>’
> /usr/local/include/InsightToolkit/Review/itkOptGrayscaleMorphologicalClosingImageFilter.h:53:
> error: previous definition of ‘class
> itk::GrayscaleMorphologicalClosingImageFilter<TInputImage, TOutputImage,
> TKernel>’
> In file included from
> /usr/local/include/InsightToolkit/BasicFilters/itkGrayscaleMorphologicalClosingImageFilter.h:155,
> from
> /usr/local/include/InsightToolkit/Review/itkOptGrayscaleMorphologicalClosingImageFilter.txx:20,
> from
> /usr/local/include/InsightToolkit/Review/itkOptGrayscaleMorphologicalClosingImageFilter.h:159,
> from
> /mnt/Public/Programs/ITK_Test/Morphology/Consolidated_morphology/Closing/2D/Src/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.cxx:22:
>
> .....
> etc...
> .....
>
> /usr/local/include/InsightToolkit/BasicFilters/itkGrayscaleMorphologicalClosingImageFilter.txx:147:
> error: ‘void itk::GrayscaleMorphologicalClosingImageFilter<TInputImage,
> TOutputImage, TKernel>::PrintSelf(std::ostream&, itk::Indent) const’
> previously declared here
> make[2]: ***
> [CMakeFiles/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.dir/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.cxx.o]
> Error 1
> make[1]: ***
> [CMakeFiles/itkMapOptGrayscaleMorphologicalClosingImageFilterTest.dir/all]
> Error 2
> make: *** [all] Error 2
> dzyubak at debian-alex: /BUILD$
> *********
>
> Is this a bug?
>
> After digging the header and template files,
> I found that all those errors could be fixed
> by making corrections in the template file
> "itkOptGrayscaleMorphologicalClosingImageFilter.txx" as below.
>
> // #include "itkGrayscaleMorphologicalClosingImageFilter.h"
> #include "itkOptGrayscaleMorphologicalClosingImageFilter.h"
>
> As I can see, similar corrections should be done in the template
> itkOptGrayscaleMorphologicalOpeningImageFilter.txx as well
>
> // #include "itkGrayscaleMorphologicalOpeningImageFilter.h"
> #include "itkOptGrayscaleMorphologicalOpeningImageFilter.h"
>
> Regards,
>
> Alex
>
> _____________________________________
> 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/20100920/2ba21256/attachment.htm>
More information about the Insight-users
mailing list