[ITK-users] Minimum Distance to multiple connected regions

Bradley Lowekamp blowekamp at mail.nih.gov
Tue Sep 29 08:25:53 EDT 2015


Hello,

I would look into the MorphologicalWatershedFromMarkersImageFilter [1]. 

Brad

[1] http://www.itk.org/Doxygen/html/classitk_1_1MorphologicalWatershedFromMarkersImageFilter.html

On Sep 29, 2015, at 4:57 AM, marco giordano <marco.giord at gmail.com> wrote:

> Hi there ITK community ,
> 
> I am working on a task to calculate the minimum distance to multiple regions of an organ in 3D. Basically I have an image containing 20 connected regions indicated by integers from 1 to 20.
> My task is to assign to each voxel in the 3D volume, the label (i.e. the integer) corresponding to the closest region to that voxel. I have checked the Danielsson filter and it seems suitable to my task, however I tried it and it did not really work. To my understanding it assumes that the regions are disconnected and are indicated by "one's'" (page 127 of ITK manual 4.8) so it is not suitable for connected regions. Maybe someone has a better solution to solve my task?
> 
> One solution that came to my mind is run the Danielsson filter on each region separately and then search for the minimum distance for each pixel and fetch the corresponding label. 
> I wrote some code (see attachment) but I get a crash when I try to access the result of the Danielsson filter with an iterator. I admit that I do not have much experience so it might be some syntax errors in coding or in handling the ITK objects etc.
> 
> Any help is appreciated.
> 
> Regards,
> Marco               
> 
> <ComputeMinDistanceLabels.cpp>_____________________________________
> 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.php
> 
> 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://public.kitware.com/mailman/listinfo/insight-users



More information about the Insight-users mailing list