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> the line</div><div>hessian-&gt;SetSigmaMinimum(2.4);</div><div>should be </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 MultiScaleHessianBasedMeasureImageFilter and HessianToObjectnessMeasureImageFilter, however, I&#39;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> </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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">thr-&gt;SetLower(80); </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="&#39;courier new&#39;, monospace">thr-&gt;SetUpper(10000); // remove other parts of the image with low values</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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">typedef itk::MultiScaleHessianBasedMeasureImageFilter </font><span style="font-family:&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">ty</font></span><font face="&#39;courier new&#39;, monospace">pedef itk::HessianToObjectnessMeasureImageFilter </font><span style="font-family:&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><span style="white-space:pre-wrap">  </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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><span style="white-space:pre-wrap">  </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; &quot;: itk::ExceptionObject caught: &quot; &lt;&lt; e.what() </font><span style="font-family:&#39;courier new&#39;, monospace">&lt;&lt; &#39;\n&#39;;</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="&#39;courier new&#39;, monospace"><span style="white-space:pre-wrap">  </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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace"><span style="white-space:pre-wrap">  </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; &quot;: &#39;...&#39; exception caught.\n&quot;;</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="&#39;courier new&#39;, monospace"><span style="white-space:pre-wrap">  </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="&#39;courier new&#39;, 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="&#39;courier new&#39;, monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span style="font-family:&#39;courier new&#39;, monospace">(__FUNCTION__, &quot;Vesselness.mhd&quot;, *(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="&#39;courier new&#39;, monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><font face="&#39;courier new&#39;, monospace">(__FUNCTION__, &quot;Scales.mhd&quot;, *(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="&#39;courier new&#39;, monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span style="font-family:&#39;courier new&#39;, monospace">(__FUNCTION__, &quot;Converted2Float.mhd&quot;, *(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> 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 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> 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>