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

Barbara Post bpo at eonix.be
Wed Mar 19 09:49:58 EDT 2014


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140319/f4909a97/attachment.html>


More information about the Insight-users mailing list