[Insight-users] using MultiScaleHessianBasedMeasureImageFilter with Hessian3DToVesselnessMeasureImageFilter
Sergio Vera
sergio.vera at alma3d.com
Mon Feb 21 05:45:19 EST 2011
Hello again
I found the problem to be in line 0. The Hessian Matrix must be double for
the Sato filter to work via SetHessianToMeasureFilter. I used float in
order to save memory but it seems that it has to be double.
Hope this helps anyone in the future.
Regards
On Mon, Feb 21, 2011 at 11:17 AM, Sergio Vera <sergio.vera at alma3d.com>wrote:
> Hello all
>
> I've been able to use MultiScaleHessianBasedMeasureImageFilter with HessianToObjectnessMeasureImageFilter
> (Frangi vesselness), but I'm unable to use it with Sato Vesselness
> (Hessian3DToVesselnessMeasureImageFilter)
> From the original article of the Insight Journal (
> http://www.insight-journal.org/browse/publication/175), it seems that this
> sould be possible but trying to use the same code results in compilation
> errors, here is the snippet of the code although it seems that the filter
> has been slightly modified after bein introduced to itk:
>
> 0: typedef itk::SymmetricSecondRankTensor<float, 3> HessianPixelType;
> 1: typedef itk::Image<HessianPixelType, 3> HessianImage;
> 2: typedef itk::Image<float,3> FloatImage;
> 3: typedef itk::MultiScaleHessianBasedMeasureImageFilter<FloatImage,
> HessianImage, FloatImage> MultiScaleEnhancementFilterType;
> 4: typedef itk::Hessian3DToVesselnessMeasureImageFilter<float>
> SatoVesselness;
> 5: MultiScaleEnhancementFilterType::Pointer multiScaleEnhancementFilter =
> MultiScaleEnhancementFilterType::New();
> 6: multiScaleEnhancementFilter->SetInput(inputImg);
>
> 7: SatoVesselness* vesselnessFilter =
> multiScaleEnhancementFilter->GetHessianToMeasureFilter();
> 8: vesselnessFilter->SetAlpha1(0.5);
> 9: vesselnessFilter->SetAlpha2(0.5);
> 10: multiScaleEnhancementFilter->SetSigmaStepMethodToLogarithmic();
> 11: multiScaleEnhancementFilter->GenerateScalesOutputOn();
> 12: multiScaleEnhancementFilter->SetSigmaMinimum(a_minTargetVesselSize);
> 13: multiScaleEnhancementFilter->SetSigmaMaximum(a_maxTargetVesselSize);
> 14: multiScaleEnhancementFilter->SetNumberOfSigmaSteps(a_sizeSteps);
> 15: multiScaleEnhancementFilter->Update();
>
> This snippet does not compile (line 7):
> error C2440: 'initializing' : cannot convert from
> 'itk::ImageToImageFilter<TInputImage,TOutputImage> *' to 'SatoVesselness *'
> 1> with
> 1> [
> 1> TInputImage=itk::Image<HessianPixelType,3>,
> 1> TOutputImage=itk::Image<float,3>
> 1> ]
> 1> Types pointed to are unrelated; conversion requires
> reinterpret_cast, C-style cast or function-style cast
>
> I tried to use reinterpre_cast to no avail... and Hessian3DToVesselness do
> inherits from ImageToImage. I've also tried to create a ::New() Hessian3DToVesselness
> and assign to MultiScaleHessian with SetHessianToMeasureFilter, but this
> does not wotk either..
>
> Any ideas on why this does not work?
>
> Regards
> --
> Sergio Vera
>
> Alma IT Systems
> C/ Vilana, 4B, 4º 1ª
> 08022 Barcelona
> T. (+34) 932 380 592
> www.alma3d.com
>
--
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/20110221/b7a6b784/attachment.htm>
More information about the Insight-users
mailing list