[Insight-users] MultiScaleHessianBasedMeasureImageFilter + HessianToObjectnessMeasureImageFilter, empty image

Sergio Vera sergio.vera at alma3d.com
Mon Oct 11 06:22:02 EDT 2010


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101011/2e1efdc3/attachment-0001.htm>


More information about the Insight-users mailing list