Discussion:
[ITK-users] exponential of values of a pointset
Ian Malone
2018-09-11 18:32:29 UTC
Permalink
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

The ITK community is transitioning from this mailing list to discourse.itk.org. Please join us there!
________________________________
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:
https://itk.org/m
Dženan Zukić
2018-09-12 17:24:27 UTC
Permalink
Hi Ian,

there are many ways to do some custom processing for unary or binary per
pixel operations. This
<https://discourse.itk.org/t/thresholding-a-mask/1270/2> and this
<https://discourse.itk.org/t/thresholding-a-mask/1270/3> answer to a recent
question should help you.

Regards,
DÅŸenan
Post by Ian Malone
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?
In instantiation of ‘TOutput itk::Functor::Exp<TInput,
TOutput>::operator()(const TInput&) const [with TInput =
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
The ITK community is transitioning from this mailing list to
discourse.itk.org. Please join us there!
________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
Ian Malone
2018-09-13 09:46:59 UTC
Permalink
Looks good, thanks very much.
Post by Dženan Zukić
Hi Ian,
there are many ways to do some custom processing for unary or binary
per pixel operations. This
<https://discourse.itk.org/t/thresholding-a-mask/1270/2> and this
<https://discourse.itk.org/t/thresholding-a-mask/1270/3> answer to
a recent question should help you.
Regards,
DÅŸenan
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?
In instantiation of ‘TOutput itk::Functor::Exp<TInput,
TOutput>::operator()(const TInput&) const [with TInput =
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
The ITK community is transitioning from this mailing list to
discourse.itk.org <http://discourse.itk.org>. Please join us there!
________________________________
Powered by www.kitware.com <http://www.kitware.com>
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.kitware.com/products/protraining.php
http://www.itk.org/Wiki/ITK_FAQ
https://itk.org/mailman/listinfo/insight-users
Loading...