[Insight-users] itkStreamingImageFilter with itkHessianSmoothed3DToVesselnessMeasureImageFilter

Iván Macía imacia at vicomtech.org
Thu Nov 6 04:33:37 EST 2008


Dear all,

I made some tests some time ago and as Karthik says I was expecting also a
factor of about 10x but results were rather disappointing. As you mention,
the size of the kernel is critical. If the size of the kernel was half, the
speed up would be 2^3 = 8 times faster which makes the method approximately
30 times slower (with a kernel of 7x7x7 is about 6.9 times faster).

In the case of first order derivatives we can make the size of the kernel
smaller but note that due to Nyquist sampling theorem, at the time of
calculating the Hessian we cannot make the kernel width too small because we
are using second order derivatives.

If you have a dataset let's say of size 512x512x100 = 26214400 voxels with a
factor of 30x slower then you could still calculate the Hessian locally in
less than 873800 points and you will already run faster. If the factor is
250 you can still do it in about 105000 voxels.   

If you are going to perform vessel analysis then it is likely that you
reduce the number of candidates before calculating any Hessian. For example
there are no vessels in the air, and also vessels are usually contrasted.

The good point here is that you don't need as much as 512x512x100x6
components of hessian x 4 bytes/float pixel = 630 Mb of memory, 1.2 Gb.
using doubles that you would need using recursive Gaussians. This is
prohibitive in most cases.

The approach could be very good for example in iterative vessel tracking
approaches where you need to calculate one Hessian at a time.

Apart from trying to reduce the size of the kernel to a minimum (it would be
nice to have a method for calculating this automatically) I don’t have many
ideas on how to reduce the calculation times for the Hessian.

Dan, I will try to have a look to the problem of the spacing when I find
some time but right now I'm extremely busy with this pile of work in my
desktop. If you find something new about this please let me know.

Regards

Ivan



-----Mensaje original-----
De: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] 
Enviado el: miércoles, 05 de noviembre de 2008 16:22
Para: Dan Mueller
CC: Iván Macía; insight-users at itk.org
Asunto: Re: [Insight-users] itkStreamingImageFilter with
itkHessianSmoothed3DToVesselnessMeasureImageFilter

On Wed, Nov 5, 2008 at 4:14 AM, Dan Mueller <dan.muel at gmail.com> wrote:
> Hi Iván,
>
>> Could someone also test the performance?
>
> I put together a simple program (see below) to test the performance of
> DiscreteHessianGaussianImageFunction (the test image is in the ITK
> Testing\Data\Input folder). As you assumed the recursive approach is
> much faster:
>
> HessianTest HeadMRVolumeCompressed.mha
> Filter took 0.0792656 seconds
> Function took 17.0815 seconds
>
> Image Size = [48, 62, 42]
> Image Spacing = [4.0, 4.0, 4.0]
> Sigma = 1.0
> MaxKernelWidth = 32
> MaximumError = 0.01
> NormalizeAcrossScale = false
> UseImageSpacing = false
>
> Speed Factor = 17.08 / 0.079 = 216
>
> (Windows Vista SP1, Visual Studio 2005, Release build, Intel Core 2
> Duo 2GHz, 3 GB RAM)
>
> So to make the new function pay off (in terms of speed) it seems a
> user will have to restrict the computation to an image region ~1/250
> of the whole input image. For my use cases this is a certainty, but I
> can image for some (most?) this will not be the case.

Thanks a lot Dan. This information is very helpful. It would be great if you
could add it as a review to the paper:
  http://www.insight-journal.org/browse/publication/179

A factor of 250 is rather steep. I was hoping it'd be a x10 slowdown,
which would
work well for me. Having a function is very convenient since I can compute
the hessian on a masked image, which is what I need.

Ivan: Could you please tell us if you expected a factor of 250 slowdown ?

Thanks
--
karthik



More information about the Insight-users mailing list