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

Ian Malone <i.malone-hclig2XLE9Zaa/[email protected]> Thu, 13 Sep 2018 10:46:59 +0100
Newsgroups gmane.comp.lib.itk.user
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============1634283161==
Content-Type: multipart/alternative;
 boundary="------------E6F07E10C3D55B9B85B7F1BC"
Content-Language: en-GB

This is a multi-part message in MIME format.
--------------E6F07E10C3D55B9B85B7F1BC
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit

Looks good, thanks very much.

On 12/09/18 18:24, Dženan Zukić wrote:
> 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
>
> On Tue, Sep 11, 2018 at 2:32 PM Ian Malone <i.malone-hclig2XLE9Zaa/[email protected] 
> <mailto: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 ‘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 <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
>
>     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
>


--------------E6F07E10C3D55B9B85B7F1BC
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 8bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">Looks good, thanks very much.<br>
      <br>
      On 12/09/18 18:24, Dženan Zukić wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAPf2UMQWw-Bt7RAQCQu48vLpV+XbJSgEKjEkcCkZ4wS57qLzzw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <div dir="ltr">
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Hi Ian,</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small"><br>
        </div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">there
          are many ways to do some custom processing for unary or binary
          per pixel operations. <a
            href="https://discourse.itk.org/t/thresholding-a-mask/1270/2"
            moz-do-not-send="true">This</a> and <a
            href="https://discourse.itk.org/t/thresholding-a-mask/1270/3"
            moz-do-not-send="true">this</a> answer to a recent question
          should help you.</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small"><br>
        </div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Regards,</div>
        <div class="gmail_default"
          style="font-family:verdana,sans-serif;font-size:small">Dženan</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr">On Tue, Sep 11, 2018 at 2:32 PM Ian Malone &lt;<a
            href="mailto:i.malone-hclig2XLE9Zaa/[email protected]" moz-do-not-send="true">i.malone-hclig2XLE9Zaa/[email protected]</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi, I'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 ‘TOutput itk::Functor::Exp&lt;TInput, <br>
          TOutput&gt;::operator()(const TInput&amp;) const [with TInput
          = <br>
          itk::Vector&lt;float, 1u&gt;; TOutput = itk::Vector&lt;float,
          1u&gt;]’:<br>
          <br>
          <br>
/tmp/myitk/ITK/Modules/Filtering/ImageIntensity/include/itkExpImageFilter.h:51:69:
          <br>
          error: invalid static_cast from type ‘const
          itk::Vector&lt;float, 1u&gt;’ to <br>
          type ‘double’<br>
                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="http://discourse.itk.org" rel="noreferrer"
            target="_blank" moz-do-not-send="true">discourse.itk.org</a>.
          Please join us there!<br>
          ________________________________<br>
          Powered by <a href="http://www.kitware.com" rel="noreferrer"
            target="_blank" moz-do-not-send="true">www.kitware.com</a><br>
          <br>
          Visit other Kitware open-source projects at<br>
          <a href="http://www.kitware.com/opensource/opensource.html"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://www.kitware.com/opensource/opensource.html</a><br>
          <br>
          Kitware offers ITK Training Courses, for more information
          visit:<br>
          <a href="http://www.kitware.com/products/protraining.php"
            rel="noreferrer" target="_blank" moz-do-not-send="true">http://www.kitware.com/products/protraining.php</a><br>
          <br>
          Please keep messages on-topic and check the ITK FAQ at:<br>
          <a href="http://www.itk.org/Wiki/ITK_FAQ" rel="noreferrer"
            target="_blank" moz-do-not-send="true">http://www.itk.org/Wiki/ITK_FAQ</a><br>
          <br>
          Follow this link to subscribe/unsubscribe:<br>
          <a href="https://itk.org/mailman/listinfo/insight-users"
            rel="noreferrer" target="_blank" moz-do-not-send="true">https://itk.org/mailman/listinfo/insight-users</a><br>
        </blockquote>
      </div>
    </blockquote>
    <p><br>
    </p>
  </body>
</html>

--------------E6F07E10C3D55B9B85B7F1BC--

--===============1634283161==
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

--===============1634283161==--