<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; "><div><span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">Hi Daniela,</span></div>
filterCost-&gt;SetInput(filter-&gt;GetOutput);</span><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">lacks the parentheses to the GetOutput() call:</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; ">filterCost-&gt;SetInput(filter-&gt;GetOutput());</span></span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">regards<br>
</span></font><div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><br></span></font></div><div><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 11:43 AM, Daniela Sacchetto <span dir="ltr">&lt;<a href="mailto:danysunflower@hotmail.it">danysunflower@hotmail.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">



<div>
Thanks Sergio for your suggestions.<br>I try to use the filter who suggested me but I have some problem and it doesn&#39;t run.<br><br>I wrote this code:<br>-------------------------------------------------------------------------------------------------------------------------------------------------<br>
typedef itk::AddConstantToImageFilter&lt;InputImageType,const float,OutputImageType&gt; AddCostantType;<br><br>AddCostantType::Pointer filterCost= AddCostantType::New();<br><br>filterCost-&gt;SetConstant(-0.5);<br>filterCost-&gt;SetInput(filter-&gt;GetOutput);<br>
<br>filterCost-&gt;Update();<br>-----------------------------------------------------------------------------------------------------------------------------------<br><br>But I have this output:<br><br>/home/daniela/Scrivania/Skeleton_ok/DistanceTrasform/DistanceTrasform2.cxx: In function ‘int main(int, char**)’:<br>
/home/daniela/Scrivania/Skeleton_ok/DistanceTrasform/DistanceTrasform2.cxx:124: error: no matching function for call to ‘itk::AddConstantToImageFilter&lt;itk::Image&lt;signed char, 3u&gt;, const float, itk::Image&lt;short int, 3u&gt; &gt;::SetInput(&lt;unresolved overloaded function type&gt;)’<br>
<br>[...]<br><br>I included the itkAddConstantToImageFilter.h file in the same folder where I save my code (as I always do when I use header file not included in itk folder...). <br>I thinks that I&#39;m doing a stupid error, but I&#39;m not expert in itk and c++, so I need your help.<br>
<br>Thanks of all, <br>Regards<br><font color="#888888">Daniela<br></font><div class="hm"><hr>Date: Fri, 6 Aug 2010 10:52:11 +0200<br>Subject: Re: [Insight-users] (no subject)<br>From: <a href="mailto:sergio.vera@alma3d.com" target="_blank">sergio.vera@alma3d.com</a><br>
To: <a href="mailto:danysunflower@hotmail.it" target="_blank">danysunflower@hotmail.it</a><br>CC: <a href="mailto:insight-users@itk.org" target="_blank">insight-users@itk.org</a></div><div><div></div><div class="h5"><br><br>
Hi Daniela.<div><br></div><div>Matlab and ITK are completely different environments... it may take a while to adapt.</div><div><br></div><div>To substract 0.5 to a image you can use the following filter: <span style="font-family:Geneva,Arial,Helvetica,sans-serif;font-weight:bold">itk::AddConstantToImageFilter</span></div>

<div><span style="font-family:Geneva,Arial,Helvetica,sans-serif;font-size:14px"><div><span style="font-size:small"><span style="font-weight:normal"><br>
</span></span></div><div><span style="font-size:small"><span style="font-weight:normal">to perform the comparation between the images you can use </span></span><span style="font-weight:bold"><span style="font-size:small">itk::DifferenceImageFilter</span></span></div>

<div><span style="font-weight:bold"><span style="font-size:small"><br></span></span></div><div><span style="font-size:small">regards</span></div>
<div><span style="font-size:small"><span style="font-weight:normal"><br></span></span></div></span><br><div>On Fri, Aug 6, 2010 at 10:40 AM, Daniela Sacchetto <span dir="ltr">&lt;<a href="mailto:danysunflower@hotmail.it" target="_blank">danysunflower@hotmail.it</a>&gt;</span> wrote:<br>

<blockquote style="border-left:1px solid rgb(204, 204, 204);padding-left:1ex">



<div>
Hi everyone,<br>I&#39;m working in itk and I have a problem.<br><br>I have to do this operation :<br>-----------------------------------------------------------------<br>if (Daverage &lt; (D - 0.5))        (*)<br>      Dfinal=1<br>

else<br>     Dfinal=0<br>-----------------------------------------------------------------<br>where:<br><br>D= is a DistanceMap obtained with itkDanielssonDistanceMapImageFilter;<br>Daverage = is D filtered with  itkDiscreteGaussianImageFilter;<br>

<br>Dfinal = is a 3D map where pixel are black or white depending from (*).<br><br>I&#39;m trying to do it but I have several problems with operations/comparisons between images... Could anyone help me?<br><br>For example in Matlab I can simply do:<br>

 D - 0.5<br>to substract 0.5 to every pixel of my image... I tryed to do the same in itk but it doesn&#39;t run...<br><br>Thanks all for help<br>Daniela<br>                                               </div>
<br>_____________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at<br>
<a href="http://www.kitware.com/opensource/opensource.html" target="_blank">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.html" target="_blank">http://www.kitware.com/products/protraining.html</a><br>
<br>
Please keep messages on-topic and check the ITK FAQ at:<br>
<a href="http://www.itk.org/Wiki/ITK_FAQ" target="_blank">http://www.itk.org/Wiki/ITK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.itk.org/mailman/listinfo/insight-users" target="_blank">http://www.itk.org/mailman/listinfo/insight-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com" target="_blank">www.alma3d.com</a><br>

</div>                                               </div></div></div>
</blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br> Alma IT Systems<br> C/ Vilana, 4B, 4º 1ª<br> 08022 Barcelona<br> T. (+34) 932 380 592<br> <a href="http://www.alma3d.com">www.alma3d.com</a><br>
</div></div>