[ITK-users] (newbie) filter SetRadius() compilation issue
Barbara Post
bpo at eonix.be
Wed Mar 19 11:47:38 EDT 2014
Thanks Jon and Luis, you helped me, the following code compiles now.
typedef itk::AdaptiveHistogramEqualizationImageFilter<XITKTools::ItkImage3DFloatType> AdaptiveHistogramEqualizationImageFilterType;
AdaptiveHistogramEqualizationImageFilterType::Pointer adaptiveHistogramEqualizationImageFilter
= AdaptiveHistogramEqualizationImageFilterType::New();
adaptiveHistogramEqualizationImageFilter->SetInput(itkImage);
XITKTools::ItkImage3DFloatType::SizeType radius;
radius.Fill(1);
adaptiveHistogramEqualizationImageFilter->SetRadius(radius);
--
From: Jon Haitz Legarreta [mailto:jhlegarreta at vicomtech.org]
Sent: mercredi 19 mars 2014 16:15
To: Barbara Post
Cc: insight-users at itk.org
Subject: Re: [ITK-users] (newbie) filter SetRadius() compilation issue
Dear Barbara,
welcome to the list.
As for the example, it looks like the radius dimensions do not match the image dimensions.
I'd dare to say that your are using a 3D image (ItkImage3DFloatType in your template argument for the histogram equalization filter). Thus, the radius for your filter also requires 3 components.
HTH,
JON HAITZ
On 19 March 2014 14:49, Barbara Post <bpo at eonix.be<mailto: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<http://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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20140319/bf707e16/attachment-0001.html>
More information about the Insight-users
mailing list