[ITK] [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://public.kitware.com/pipermail/community/attachments/20140319/f4909a97/attachment.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