[ITK] [ITK-users] Minimum Distance to multiple connected regions
marco giordano
marco.giord at gmail.com
Tue Sep 29 04:57:03 EDT 2015
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150929/a962f77d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ComputeMinDistanceLabels.cpp
Type: text/x-c++src
Size: 5961 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20150929/a962f77d/attachment.cpp>
-------------- next part --------------
_____________________________________
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 Community
mailing list