[ITK-users] exponential of values of a pointset

Ian Malone i.malone at ucl.ac.uk
Tue Sep 11 14:32:29 EDT 2018


Hi, I'm writing a filter in ITK-5.0 and trying to get exponential values 
of pointset data, however I seem to be running into problems with the 
template for itkExpImageFilter not liking the fact the values are 
represented as itk::Vector<float, 1u>. Is there any way around this 
short of writing a filter for it?

/tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h: 
In instantiation of ‘TOutput itk::Functor::Exp<TInput, 
TOutput>::operator()(const TInput&) const [with TInput = 
itk::Vector<float, 1u>; TOutput = itk::Vector<float, 1u>]’:


/tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h:51:69: 
error: invalid static_cast from type ‘const itk::Vector<float, 1u>’ to 
type ‘double’
      return static_cast<TOutput>( std::exp( static_cast<double>( A ) ) );


Thanks,

Ian



More information about the Insight-users mailing list