<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
(1) Try&nbsp;<span class="Apple-style-span" style="font-family: 'courier new', monospace; color: rgb(42, 42, 42); ">HessianPixelType</span>&nbsp;of type <font class="Apple-style-span" face="'Courier New'">double</font>.<div>(2) Instead of&nbsp;<span class="Apple-style-span" style="font-family: 'courier new', monospace; ">HessianToObjectnessMeasureImageFilter</span>&nbsp;use <font class="Apple-style-span" face="'Courier New'">Hessian3DToVesselnessMeasureImageFilter</font>.</div><div><div><br></div><div>RS.<br><br><hr id="stopSpelling">Date: Mon, 11 Oct 2010 12:22:02 +0200<br>From: sergio.vera@alma3d.com<br>To: insight-users@itk.org<br>Subject: [Insight-users] MultiScaleHessianBasedMeasureImageFilter + HessianToObjectnessMeasureImageFilter, empty image<br><br>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="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">typedef itk::ThresholdImageFilter&lt;ITKImgInType&gt; ThrFilter;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">ThrFilter::Pointer thr = ThrFilter::New();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">thr-&gt;SetInput(&amp;a_imgIn);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">thr-&gt;SetLower(80);&nbsp;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">thr-&gt;SetUpper(10000); // remove other parts of the image with low values</font>&nbsp;</blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><br></font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">typedef itk::CastImageFilter&lt;ITKImgInType, F1d3ITKImgType&gt; CastFilter;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">CastFilter::Pointer cast2float = CastFilter::New();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">cast2float-&gt;SetInput(thr-&gt;GetOutput());</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><br></font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">typedef itk::SymmetricSecondRankTensor&lt;float, 3&gt; HessianPixelType;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">typedef itk::Image&lt;HessianPixelType, 3&gt; HessianImage;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><br></font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">typedef itk::MultiScaleHessianBasedMeasureImageFilter&nbsp;</font><span class="ecxApple-style-span" style="font-family:'courier new', monospace">&lt;F1d3ITKImgType, HessianImage, F1d3ITKImgType&gt; HessianFilter;</span></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">HessianFilter::Pointer hessian = HessianFilter::New();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetInput(cast2float-&gt;GetOutput());</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetNumberOfSigmaSteps(6);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetSigmaStepMethodToEquispaced();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetSigmaMinimum(1.1);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetSigmaMinimum(2.4); // This sizes in mm?</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetGenerateHessianOutput(true);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetGenerateScalesOutput(true);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><br></font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-tab-span" style="white-space:pre"><font class="ecxApple-style-span" face="'courier new', monospace">ty</font></span><font class="ecxApple-style-span" face="'courier new', monospace">pedef itk::HessianToObjectnessMeasureImageFilter&nbsp;</font><span class="ecxApple-style-span" style="font-family:'courier new', monospace">&lt;HessianImage, F1d3ITKImgType&gt; ObjectnessFilter;</span></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">ObjectnessFilter::Pointer vesselFilter = ObjectnessFilter::New();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetScaleObjectnessMeasure(false);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetBrightObject(true);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetAlpha(0.5);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetBeta(0.5);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetGamma(5.0);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">vesselFilter-&gt;SetObjectDimension(1); // vessels</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-tab-span" style="white-space:pre"><font class="ecxApple-style-span" face="'courier new', monospace">        </font></span></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">hessian-&gt;SetHessianToMeasureFilter(vesselFilter);</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-tab-span" style="white-space:pre"><font class="ecxApple-style-span" face="'courier new', monospace">        </font></span></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">try {</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><span class="ecxApple-style-span" style="white-space:pre">&nbsp; </span>hessian-&gt;Update();</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">} catch (const itk::ExceptionObject&amp; e) {</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><span class="ecxApple-style-span" style="white-space:pre">&nbsp; </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; ": itk::ExceptionObject caught: " &lt;&lt; e.what()&nbsp;</font><span class="ecxApple-style-span" style="font-family:'courier new', monospace">&lt;&lt; '\n';</span></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><span class="ecxApple-style-span" style="white-space:pre">&nbsp; </span>return eErrorITKExceptionRunningSegmentation;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">} catch (...) {</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><span class="ecxApple-style-span" style="white-space:pre">&nbsp; </span>std::cerr &lt;&lt; __FUNCTION__ &lt;&lt; ": '...' exception caught.\n";</font></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace"><span class="ecxApple-style-span" style="white-space:pre">&nbsp; </span>return eErrorUnknownExceptionStartingSegmentation;</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">}</font></blockquote><blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span class="ecxApple-style-span" style="font-family:'courier new', monospace">(__FUNCTION__, "Vesselness.mhd", *(hessian-&gt;GetOutput()), true);</span></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><font class="ecxApple-style-span" face="'courier new', monospace">(__FUNCTION__, "Scales.mhd", *(hessian-&gt;GetScalesOutput()), true);</font></blockquote>
<blockquote class="ecxgmail_quote" style="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 class="ecxApple-style-span" face="'courier new', monospace">spy::WriteFile&lt;F1d3ITKImgType&gt;</font><span class="ecxApple-style-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>
<br>_____________________________________
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.html

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-users</div></div>
                                               </body>
</html>