[Insight-users] MultiScaleHessianBasedMeasureImageFilter + HessianToObjectnessMeasureImageFilter, empty image
Sergio Vera
sergio.vera at alma3d.com
Wed Oct 13 04:23:54 EDT 2010
Ravi, Luca, thanks to both of you.
Indeed a stupid mistake, using twice the SetSigmaMinimum method... :(
Now the filter works properly :)
I might add another question?
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..
thanks
On Mon, Oct 11, 2010 at 11:11 PM, Luca Antiga <luca.antiga at gmail.com> wrote:
> Hi Sergio,
> the line
> hessian->SetSigmaMinimum(2.4);
> should be
> hessian->SetSigmaMaximum(2.4);
>
> Probably a method SetSigmaRange taking two arguments would be a safer
> choice to avoid this kinds of mistakes.
>
> Hope this helps.
>
> Luca
>
>
>
> On Oct 11, 2010, at 12:22 PM, Sergio Vera wrote:
>
> Hello all
>
> 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'm only obtainig empty
> (black) images as a result of the enhancement and the scales.
>
> Here is a snippet of the code:
>
>
>> typedef itk::ThresholdImageFilter<ITKImgInType> ThrFilter;
>
> ThrFilter::Pointer thr = ThrFilter::New();
>
> thr->SetInput(&a_imgIn);
>
> thr->SetLower(80);
>
> thr->SetUpper(10000); // remove other parts of the image with low values
>
>
>> typedef itk::CastImageFilter<ITKImgInType, F1d3ITKImgType> CastFilter;
>
> CastFilter::Pointer cast2float = CastFilter::New();
>
> cast2float->SetInput(thr->GetOutput());
>
>
>> typedef itk::SymmetricSecondRankTensor<float, 3> HessianPixelType;
>
> typedef itk::Image<HessianPixelType, 3> HessianImage;
>
>
>> typedef itk::MultiScaleHessianBasedMeasureImageFilter <F1d3ITKImgType,
>> HessianImage, F1d3ITKImgType> HessianFilter;
>
> HessianFilter::Pointer hessian = HessianFilter::New();
>
> hessian->SetInput(cast2float->GetOutput());
>
> hessian->SetNumberOfSigmaSteps(6);
>
> hessian->SetSigmaStepMethodToEquispaced();
>
> hessian->SetSigmaMinimum(1.1);
>
> hessian->SetSigmaMinimum(2.4); // This sizes in mm?
>
> hessian->SetGenerateHessianOutput(true);
>
> hessian->SetGenerateScalesOutput(true);
>
>
>> typedef itk::HessianToObjectnessMeasureImageFilter <HessianImage,
>> F1d3ITKImgType> ObjectnessFilter;
>
> ObjectnessFilter::Pointer vesselFilter = ObjectnessFilter::New();
>
> vesselFilter->SetScaleObjectnessMeasure(false);
>
> vesselFilter->SetBrightObject(true);
>
> vesselFilter->SetAlpha(0.5);
>
> vesselFilter->SetBeta(0.5);
>
> vesselFilter->SetGamma(5.0);
>
> vesselFilter->SetObjectDimension(1); // vessels
>
> hessian->SetHessianToMeasureFilter(vesselFilter);
>
> try {
>
> hessian->Update();
>
> } catch (const itk::ExceptionObject& e) {
>
> std::cerr << __FUNCTION__ << ": itk::ExceptionObject caught: " <<
>> e.what() << '\n';
>
> return eErrorITKExceptionRunningSegmentation;
>
> } catch (...) {
>
> std::cerr << __FUNCTION__ << ": '...' exception caught.\n";
>
> return eErrorUnknownExceptionStartingSegmentation;
>
> }
>
> spy::WriteFile<F1d3ITKImgType>(__FUNCTION__, "Vesselness.mhd",
>> *(hessian->GetOutput()), true);
>
> spy::WriteFile<F1d3ITKImgType>(__FUNCTION__, "Scales.mhd",
>> *(hessian->GetScalesOutput()), true);
>
> spy::WriteFile<F1d3ITKImgType>(__FUNCTION__, "Converted2Float.mhd",
>> *(cast2float->GetOutput()), true);
>
>
> The two first images written to disk are empty. Correct size and spacing
> but only black voxels. Converted2Float.mhd seems to be correcttly converted
> Thanks in advance
> --
> Sergio Vera
>
> Alma IT Systems
> C/ Vilana, 4B, 4º 1ª
> 08022 Barcelona
> T. (+34) 932 380 592
> www.alma3d.com
> _____________________________________
>
> 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
>
>
>
--
Sergio Vera
Alma IT Systems
C/ Vilana, 4B, 4º 1ª
08022 Barcelona
T. (+34) 932 380 592
www.alma3d.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101013/a885d67a/attachment.htm>
More information about the Insight-users
mailing list