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 class="Apple-style-span" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-weight: bold; ">itk::AddConstantToImageFilter</span></div>
<div><span class="Apple-style-span" style="font-family: Geneva, Arial, Helvetica, sans-serif; font-size: 14px; "><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><br>
</span></span></div><div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;">to perform the comparation between the images you can use </span></span><span class="Apple-style-span" style="font-weight: bold; "><span class="Apple-style-span" style="font-size: small;">itk::DifferenceImageFilter</span></span></div>
<div><span class="Apple-style-span" style="font-weight: bold; "><span class="Apple-style-span" style="font-size: small;"><br></span></span></div><div><span class="Apple-style-span" style="font-size: small;">regards</span></div>
<div><span class="Apple-style-span" style="font-size: small;"><span class="Apple-style-span" style="font-weight: normal;"><br></span></span></div></span><br><div class="gmail_quote">On Fri, Aug 6, 2010 at 10:40 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>
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">www.alma3d.com</a><br>
</div>