[Insight-users] MultiScaleHessianBasedMeasureImageFilter + HessianToObjectnessMeasureImageFilter, empty image

Luca Antiga luca.antiga at gmail.com
Mon Oct 11 17:11:29 EDT 2010


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101011/93057785/attachment.htm>


More information about the Insight-users mailing list