[ITK] [ITK-users] (newbie) filter SetRadius() compilation issue

Luis Ibanez luis.ibanez at kitware.com
Wed Mar 19 11:20:24 EDT 2014


Hi Barbara,

This is the consequence of a recent improvement on how the
basic array classes in ITK get constructed by default.


You can easily get around this by replacing the line:

    adaptiveHistogramEqualizationImageFilter->SetRadius(1);


with the lines:


  AdaptiveHistogramEqualizationImageFilterType::RadiusType radius;

  radius.Fill(1);

  adaptiveHistogramEqualizationImageFilter->SetRadius(radius);



Please let us know if you find any other problems.


    Thanks


         Luis


On Wed, Mar 19, 2014 at 9:49 AM, Barbara Post <bpo at eonix.be> wrote:

>  Sorry if I’m a newbie, but I have compilation trouble with following
> wiki example :
>
>
>
>
> http://www.itk.org/Wiki/ITK/Examples/NeedDemo/ImageProcessing/AdaptiveHistogramEqualizationImageFilter
>
>
>
> Code from wiki :
>
>
>
> typedef
> itk::AdaptiveHistogramEqualizationImageFilter<XITKTools::ItkImage3DFloatType>
> AdaptiveHistogramEqualizationImageFilterType;
>
>           AdaptiveHistogramEqualizationImageFilterType::Pointer
> adaptiveHistogramEqualizationImageFilter
>
>                   = AdaptiveHistogramEqualizationImageFilterType::New();
>
>           adaptiveHistogramEqualizationImageFilter->SetInput(itkImage);
>
>
>
>           *adaptiveHistogramEqualizationImageFilter->SetRadius(1); *
>
>
>
> Compilation error :
>
>
>
> error: C2664:
> 'itk::AdaptiveHistogramEqualizationImageFilter<TImageType>::SetRadius' :
> cannot convert parameter 1 from 'int' to 'const itk::Size<VDimension>'
>
> with
>
> [
>
>     TImageType=imagx::itktools::XITKTools::ItkImage3DFloatType
>
> ]
>
> and
>
> [
>
>     VDimension=3
>
> ]
>
> No constructor could take the source type, or constructor overload
> resolution was ambiguous
>
>
>
>
>
> Another try :
>
> Change last line in code above to :
>
>
>
>       typedef itk::Image<unsigned char, 2> ImageType;
>
>           ImageType::SizeType size;
>
>           size[0] = 1;
>
>
>
>           adaptiveHistogramEqualizationImageFilter->SetRadius(size);
>
>
>
> Compilation error :
>
>
>
> error: C2664:
> 'itk::AdaptiveHistogramEqualizationImageFilter<TImageType>::SetRadius' :
> cannot convert parameter 1 from 'itk::Size<VDimension>' to 'const
> itk::Size<VDimension>'
>
> with
>
> [
>
>     TImageType=imagx::itktools::XITKTools::ItkImage3DFloatType
>
> ]
>
> and
>
> [
>
>     VDimension=2
>
> ]
>
> and
>
> [
>
>     VDimension=3
>
> ]
>
> No user-defined-conversion operator available that can perform this
> conversion, or the operator cannot be called
>
>
>
> Thanks for helping me understanding,
>
>
>
> Barbara
>
> _____________________________________
> 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.php
>
> 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
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/cgi-bin/mailman/listinfo/community
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20140319/2d93ea15/attachment-0002.html>
-------------- next part --------------
_____________________________________
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.php

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


More information about the Community mailing list