[Insight-users] itk set\get macro
l franz
l.franz25 at gmail.com
Mon Aug 1 13:39:50 EDT 2005
Hi everybody,
I have create a class in which I have to set (and get) a parameter, the
brightness threshold. For that, I used itk set/get macro:
itkSetMacro(BrightnessThreshold, int);
itkGetConstReferenceMacro(BrightnessThreshold, int);
But the program doesn't want to compile. The errors given are:
/home/gally/susan/itkUsanWeightFunction.h: In method `void
itk::UsanWeightFunction<TOperator>::SetBrightnessThreshold (int) [with
TOperator = FloatType]':
/home/gally/susan/itkFSLSusanImageFilter.txx:159: instantiated from
`itk::FSLSusanImageFilter<TInputImage, TOutputImage>::ThreadedGenerateData
(typename TOutputImage::RegionType &, int) [with TInputImage = main (int,
char **)::InputImageType, TOutputImage = main (int, char
**)::OutputImageType]'
/home/gally/programmes/itk/InsightToolkit-1.8.1/Code/IO/itkImageFileWriter.txx:158:
instantiated from here
/home/gally/susan/itkUsanWeightFunction.h:93: no matching function for call
to
`itk::UsanWeightFunction<FloatType>::GetDebug ()'
/home/gally/susan/itkFSLSusanImageFilter.txx:159: instantiated from
`itk::FSLSusanImageFilter<TInputImage, TOutputImage>::ThreadedGenerateData
(typename TOutputImage::RegionType &, int) [with TInputImage = main (int,
char **)::InputImageType, TOutputImage = main (int, char
**)::OutputImageType]'
/home/gally/programmes/itk/InsightToolkit-1.8.1/Code/IO/itkImageFileWriter.txx:158:
instantiated from here
/home/gally/susan/itkUsanWeightFunction.h:93: no matching function for call
to
`itk::UsanWeightFunction<FloatType>::Modified ()'
/home/gally/susan/itkUsanWeightFunction.h: In method `const int
&itk::UsanWeightFunction<TOperator>::GetBrightnessThreshold () const [with
TOperator = FloatType]':
/home/gally/programmes/itk/InsightToolkit-1.8.1/Code/Common/itkPoint.h:97:
instantiated from here
/home/gally/susan/itkUsanWeightFunction.h:94: no matching function for call
to
`itk::UsanWeightFunction<FloatType>::GetDebug () const'
/home/gally/susan/itkUsanWeightFunction.h:94: passing `const
itk::UsanWeightFunction<FloatType>' as
`this' argument of `const char
*itk::UsanWeightFunction<TOperator>::GetNameOfClass () [with TOperator =
FloatType]' discards qualifiers
I understand that I need GetDebug() and Modified() method, but I don't know
why... Does my class needs inheritance of something??
Thanks for advices,
Regards,
Franz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20050801/7e3f258e/attachment.htm
More information about the Insight-users
mailing list