Re: [ITK-users] exponential of values of a pointset

Dženan Zukić <[email protected]> Wed, 12 Sep 2018 13:24:27 -0400
Newsgroups gmane.comp.lib.itk.user
Message-ID <CAPf2UMQWw-Bt7RAQCQu48vLpV+XbJSgEKjEkcCkZ4wS57qLzzw@mail.gmail.com>
--===============1918927718==
Content-Type: multipart/alternative; boundary="0000000000007de84f0575afdda4"

--0000000000007de84f0575afdda4
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

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=C5=BEenan

On Tue, Sep 11, 2018 at 2:32 PM Ian Malone <i.malone-hclig2XLE9Zaa/[email protected]> wrote:

> 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 =E2=80=98TOutput itk::Functor::Exp<TInput,
> TOutput>::operator()(const TInput&) const [with TInput =3D
> itk::Vector<float, 1u>; TOutput =3D itk::Vector<float, 1u>]=E2=80=99:
>
>
> /tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter=
.h:51:69:
>
> error: invalid static_cast from type =E2=80=98const itk::Vector<float, 1u=
>=E2=80=99 to
> type =E2=80=98double=E2=80=99
>       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/mailman/listinfo/insight-users
>

--0000000000007de84f0575afdda4
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div class=3D"gmail_default" style=3D"font-family:verdana,=
sans-serif;font-size:small">Hi Ian,</div><div class=3D"gmail_default" style=
=3D"font-family:verdana,sans-serif;font-size:small"><br></div><div class=3D=
"gmail_default" style=3D"font-family:verdana,sans-serif;font-size:small">th=
ere are many ways to do some custom processing for unary or binary per pixe=
l operations. <a href=3D"https://discourse.itk.org/t/thresholding-a-mask/12=
70/2">This</a> and <a href=3D"https://discourse.itk.org/t/thresholding-a-ma=
sk/1270/3">this</a>=C2=A0answer to a=C2=A0recent question should help you.<=
/div><div class=3D"gmail_default" style=3D"font-family:verdana,sans-serif;f=
ont-size:small"><br></div><div class=3D"gmail_default" style=3D"font-family=
:verdana,sans-serif;font-size:small">Regards,</div><div class=3D"gmail_defa=
ult" style=3D"font-family:verdana,sans-serif;font-size:small">D=C5=BEenan</=
div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr">On Tue, Sep 11, 2=
018 at 2:32 PM Ian Malone &lt;<a href=3D"mailto:i.malone-hclig2XLE9Zaa/[email protected]">i.malon=
[email protected]</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I&#3=
9;m writing a filter in ITK-5.0 and trying to get exponential values <br>
of pointset data, however I seem to be running into problems with the <br>
template for itkExpImageFilter not liking the fact the values are <br>
represented as itk::Vector&lt;float, 1u&gt;. Is there any way around this <=
br>
short of writing a filter for it?<br>
<br>
/tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h=
: <br>
In instantiation of =E2=80=98TOutput itk::Functor::Exp&lt;TInput, <br>
TOutput&gt;::operator()(const TInput&amp;) const [with TInput =3D <br>
itk::Vector&lt;float, 1u&gt;; TOutput =3D itk::Vector&lt;float, 1u&gt;]=E2=
=80=99:<br>
<br>
<br>
/tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h=
:51:69: <br>
error: invalid static_cast from type =E2=80=98const itk::Vector&lt;float, 1=
u&gt;=E2=80=99 to <br>
type =E2=80=98double=E2=80=99<br>
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 return static_cast&lt;TOutput&gt;( std::exp(=
 static_cast&lt;double&gt;( A ) ) );<br>
<br>
<br>
Thanks,<br>
<br>
Ian<br>
<br>
The ITK community is transitioning from this mailing list to <a href=3D"htt=
p://discourse.itk.org" rel=3D"noreferrer" target=3D"_blank">discourse.itk.o=
rg</a>. Please join us there!<br>
________________________________<br>
Powered by <a href=3D"http://www.kitware.com" rel=3D"noreferrer" target=3D"=
_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href=3D"http://www.kitware.com/opensource/opensource.html" rel=3D"norefe=
rrer" target=3D"_blank">http://www.kitware.com/opensource/opensource.html</=
a><br>
<br>
Kitware offers ITK Training Courses, for more information visit:<br>
<a href=3D"http://www.kitware.com/products/protraining.php" rel=3D"noreferr=
er" target=3D"_blank">http://www.kitware.com/products/protraining.php</a><b=
r>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href=3D"http://www.itk.org/Wiki/ITK_FAQ" rel=3D"noreferrer" target=3D"_b=
lank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href=3D"https://itk.org/mailman/listinfo/insight-users" rel=3D"noreferre=
r" target=3D"_blank">https://itk.org/mailman/listinfo/insight-users</a><br>
</blockquote></div>

--0000000000007de84f0575afdda4--

--===============1918927718==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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/mailman/listinfo/insight-users

--===============1918927718==--