<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi Sergio,</div><div>&nbsp;good. To get less noise you can do one of two things:</div><div>1. increase sigma min</div><div>2. increase gamma (by one order of magnitude at a time)</div><div>Just play with those two and check out the differences visually, you'll be able to control the behavior of the filter.</div><div>Best regards</div><div><br></div><div>Luca</div><div><br></div><br><div><div>On Oct 13, 2010, at 10:23 AM, Sergio Vera wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Ravi, Luca, thanks to both of you.<div><br></div><div>Indeed a stupid mistake, using twice the SetSigmaMinimum method... :(</div><div>Now the filter works properly :)</div><div><br></div><div>I might add another question?</div>
<div>Is there any standard procedure or trick to reduce the amount of noisy structures that the hessian filters enhance? Along with the coronary vessels and other tubes of the image, a lot of noisy blobs are enhanced..</div>
<div><br></div><div>thanks<br><br><div class="gmail_quote">On Mon, Oct 11, 2010 at 11:11 PM, Luca Antiga <span dir="ltr">&lt;<a href="mailto:luca.antiga@gmail.com">luca.antiga@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word">Hi Sergio,<div>&nbsp;the line</div><div>hessian-&gt;SetSigmaMinimum(2.4);</div><div>should be&nbsp;</div><div><div>hessian-&gt;SetSigmaMaximum(2.4);</div></div><div><br></div><div>Probably a method SetSigmaRange taking two arguments would be a safer choice to avoid this kinds of mistakes.</div>
<div><br></div><div>Hope this helps.</div><div><br></div><div>Luca</div><div><br></div><div><br></div><div><br><div><div><div></div><div class="h5"><div>On Oct 11, 2010, at 12:22 PM, Sergio Vera wrote:</div><br></div></div>
<blockquote type="cite"><div><div></div><div class="h5">Hello all<div><br></div><div>Currently I use HessianRecursiveGaussianImageFilter Hessian3DToVesselness to enhance coronary arteries in CTA images. I would like to test the multiscale hessian enhancement using&nbsp;MultiScaleHessianBasedMeasureImageFilter and HessianToObjectnessMeasureImageFilter, however, I'm only obtainig empty (black) images as a result of the enhancement and the scales.</div>

<div><br></div><div>Here is a snippet of the code:</div><div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">typedef itk::ThresholdImageFilter&lt;ITKImgInType&gt; ThrFilter;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">ThrFilter::Pointer thr = ThrFilter::New();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">thr-&gt;SetInput(&amp;a_imgIn);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">thr-&gt;SetLower(80);&nbsp;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">thr-&gt;SetUpper(10000); // remove other parts of the image with low values</font>&nbsp;</blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><br></font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">typedef itk::CastImageFilter&lt;ITKImgInType, F1d3ITKImgType&gt; CastFilter;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">CastFilter::Pointer cast2float = CastFilter::New();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">cast2float-&gt;SetInput(thr-&gt;GetOutput());</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><br></font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">typedef itk::SymmetricSecondRankTensor&lt;float, 3&gt; HessianPixelType;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">typedef itk::Image&lt;HessianPixelType, 3&gt; HessianImage;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><br></font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">typedef itk::MultiScaleHessianBasedMeasureImageFilter&nbsp;</font><span style="font-family:'courier new', monospace">&lt;F1d3ITKImgType, HessianImage, F1d3ITKImgType&gt; HessianFilter;</span></blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">HessianFilter::Pointer hessian = HessianFilter::New();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetInput(cast2float-&gt;GetOutput());</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetNumberOfSigmaSteps(6);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetSigmaStepMethodToEquispaced();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetSigmaMinimum(1.1);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetSigmaMinimum(2.4); // This sizes in mm?</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetGenerateHessianOutput(true);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetGenerateScalesOutput(true);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><br></font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<span style="white-space:pre-wrap"><font face="'courier new', monospace">ty</font></span><font face="'courier new', monospace">pedef itk::HessianToObjectnessMeasureImageFilter&nbsp;</font><span style="font-family:'courier new', monospace">&lt;HessianImage, F1d3ITKImgType&gt; ObjectnessFilter;</span></blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">ObjectnessFilter::Pointer vesselFilter = ObjectnessFilter::New();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetScaleObjectnessMeasure(false);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetBrightObject(true);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetAlpha(0.5);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetBeta(0.5);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetGamma(5.0);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">vesselFilter-&gt;SetObjectDimension(1); // vessels</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<span style="white-space:pre-wrap"><font face="'courier new', monospace">        </font></span></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">hessian-&gt;SetHessianToMeasureFilter(vesselFilter);</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<span style="white-space:pre-wrap"><font face="'courier new', monospace">        </font></span></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">try {</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><span style="white-space:pre-wrap">&nbsp; </span>hessian-&gt;Update();</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">} catch (const itk::ExceptionObject&amp; e) {</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><span style="white-space:pre-wrap">&nbsp; </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; ": itk::ExceptionObject caught: " &lt;&lt; e.what()&nbsp;</font><span style="font-family:'courier new', monospace">&lt;&lt; '\n';</span></blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace"><span style="white-space:pre-wrap">&nbsp; </span>return eErrorITKExceptionRunningSegmentation;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">} catch (...) {</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace"><span style="white-space:pre-wrap">&nbsp; </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; ": '...' exception caught.\n";</font></blockquote>
<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace"><span style="white-space:pre-wrap">&nbsp; </span>return eErrorUnknownExceptionStartingSegmentation;</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">}</font></blockquote><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">

<font face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span style="font-family:'courier new', monospace">(__FUNCTION__, "Vesselness.mhd", *(hessian-&gt;GetOutput()), true);</span></blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><font face="'courier new', monospace">(__FUNCTION__, "Scales.mhd", *(hessian-&gt;GetScalesOutput()), true);</font></blockquote>

<blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204, 204, 204);border-left-style:solid;padding-left:1ex">
<font face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span style="font-family:'courier new', monospace">(__FUNCTION__, "Converted2Float.mhd", *(cast2float-&gt;GetOutput()), true);</span></blockquote>

</div><div><br></div><div>The two first images written to disk are empty. Correct size and spacing but only black voxels. Converted2Float.mhd seems to be correcttly converted</div><div>Thanks in advance<br>-- <br>Sergio Vera<br>

<br>&nbsp;Alma IT Systems<br>&nbsp;C/ Vilana, 4B, 4º 1ª<br>&nbsp;08022 Barcelona<br>&nbsp;T. (+34) 932 380 592<br>&nbsp;<a href="http://www.alma3d.com/" target="_blank">www.alma3d.com</a><br>
</div></div></div>
_____________________________________<div class="im"><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>
</div></blockquote></div><br></div></div></blockquote></div><br><br clear="all"><br>-- <br>Sergio Vera<br><br>&nbsp;Alma IT Systems<br>&nbsp;C/ Vilana, 4B, 4º 1ª<br>&nbsp;08022 Barcelona<br>&nbsp;T. (+34) 932 380 592<br>&nbsp;<a href="http://www.alma3d.com/">www.alma3d.com</a><br>

</div>
</blockquote></div><br></body></html>