[Insight-users] vessel enhancing diffusion filter (release 200)
fjlb at duke.edu
fjlb at duke.edu
Wed Jun 11 15:39:21 EDT 2008
Oleksandr,
I believe that the 6 in the formula is due to the fact that the Hessian matrix
contains six different partial derivatives, hence it needs to store 6
copies of
your volume in memory. I have used the filter and I had to crop and downsample
my volumes for it to work. Try downsampling your volumes and it should
not be a
problem.
Federico
Quoting Oleksandr Dzyubak <adzyubak at gmail.com>:
> Hi Luis,
>
> First of all many thanks all of you for such a good filter, "Vessel
> enhancing diffusion filter".
> With great pleasure I read the article from the the IJ distribution
> and the references therein.
>
> Since I am working on vessels, of course, I was tempted to give that
> filter a try. So I did.
> As well as Laura, I got the same error message and following your advice
> and formula, I calculated the memory request.
>
> I tested the filter using an image 565x440x100 pixels.
> BTW, why 6 in your formula "sizeof(double) x 6 bytes per pixel"?
> Do you store some intermediate results all the time?
> Lets calculate memory. In my case sizeof(double)=8.
>
> octave:2> 8*6*(565*440*100)
> ans = 1193280000
>
> OK. Filter + ImageItself = 1.19 + 0.0497 ~ 1.2397 GB
>
> I have 2 GB + 2 GB (swap). As you say, I almost hit the limit but
> some piece is still left.
> Does a swap part count? I cropped the original image (which is 100
> times larger then the one I used)
> down to 47MB just to test the filter and even with such a small image
> size the filter fails to allocate memory?
>
> Does it mean that this filter has no use for boxes with limited resources?
>
> BTW, the only
> "itkAnisotropicDiffusionVesselEnhancementImageFilterTest" fails.
> The other one,
> "itkMultiScaleHessianSmoothed3DToVesselnessMeasureImageFilterTest"
> works fine.
>
> Just by luck or you implemented another memory model?
>
> Thanks,
>
> Alex
>
> Luis Ibanez wrote:
>>
>> Hi Laura,
>>
>> This is annoying, but normal.
>>
>> This code computes Hessians of images, which in 3D requires
>> the allocation of sizeof(double) x 6 bytes per pixel.
>>
>> That is, you will need 48 bytes per pixel of your image
>> in order to store the resulting Hessian alone. There will be
>> of course additional intermediate allocations.
>>
>> If you need to process large images you may need a 64bits
>> machine with a larger memory...
>>
>> What is the actual size (in pixels) of the image that
>> you are processing ?
>>
>> Can you process selected regions of the image ?
>>
>> Usually there is a lot of empty (or at least, non interesting)
>> space in medical images. You could use the RegionOfInterest
>> filter to reduce the vessel enhancing processing to smaller
>> section of the image.
>>
>>
>> Please let us know,
>>
>>
>> Thanks
>>
>>
>> Luis
>>
>>
>>
>>
>>
>> ---------------------------------
>> Laura Fernandez de Manuel wrote:
>>> Hi all,
>>> We have been checking the implementation of the "Vessel Enhancing
>>> Diffusion Filter" depicted here:
>>> http://insight-journal.org/midas/handle.php?handle=1926/558
>>> although it works properly with the example 3D images provided
>>> (ranging from around 30 to 250 KB) we didn't succeed to make it
>>> work in images any larger (5MB images failed already for instance).
>>> We work in a system with 4GB RAM so we don't know which can be the
>>> source of the "Failed to allocate memory for image" errors that we
>>> get. Here, I attach the error message we get:
>>>
>>> ------------------------------------------------------------------------------------------------------ ./itkAnisotropicDiffusionVesselEnhancementImageFilterTest.exe image00_2.mhd
>>> image_2Enhanced.mhd
>>> Reading input image : image00_2.mhd
>>> Enhancing vessels.........: image00_2.mhd
>>> Iteration: 0
>>> Computing vesselness for scale with sigma= 0.2
>>> Exception caught:
>>> itk::ExceptionObject (0138FB20)
>>> Location: "class itk::SymmetricSecondRankTensor<double,3>
>>> *__thiscall itk::ImportImageContainer<unsigned long,class
>>> itk::SymmetricSecondRankTensor<double,3> >:: AllocateElements
>>> (unsigned long) const"
>>> File: itk3.6.0\code\common\itkImportImageContainer.txx
>>> Line: 193
>>> Description: Failed to allocate memory for image.
>>> ------------------------------------------------------------------------------------------------------ Thanks a
>>> lot!
>>> carlos & laura
>>>
>>> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Insight-users mailing list
>>> Insight-users at itk.org
>>> http://www.itk.org/mailman/listinfo/insight-users
>> _______________________________________________
>> Insight-users mailing list
>> Insight-users at itk.org
>> http://www.itk.org/mailman/listinfo/insight-users
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list