[vtkusers] How to store a binary image skeleton as a tree or graph?
Roman Grothausmann
roman.grothausmann at helmholtz-berlin.de
Thu Jul 26 09:56:49 EDT 2012
Dear mailing list members,
My aim is to store the result of AnalyzeSkeleton imagej plug-in
(http://fiji.sc/wiki/index.php/AnalyzeSkeleton#Loop_detection_and_pruning)
as an itk or vtk tree. Or if easier, the result of Skeletonize3D, i.e. a
not analysed skeleton, into a vtkGraph (there seems to be no itkGraph
strucutre).
Each tree or graph node should also store its voxel position it
originated from. Therefore, the vtk structures might be better, since
they already offer to store extra data, which itkTree does not (if I'm
not mistaken).
What would be the best way to do this?
At the moment my plan is to use a ConstNeighborhoodIterator starting at
the root of the tree, which is supplied by the user. I'd add each
CenterPixel as a node to the tree and check its 26 neighbors for other
foreground pixels. If there is at least one, take that as the next
center pixel and so iterate on. However, I'd need to keep track of
branching points (i.e. nodes with more than one child). Therefore, it
might be best to recursively traverse through the tree up to its leafs,
adding branches from the leafs. This would need, I think, separate
ConstNeighborhoodIterators for each branch.
Before I start implementing this, I wonder, is there perhaps already a
filter/tree-generator that does this? Can the KdTreeGenerator be used
for my purpose some how?
Any help or hints are very much appreciated
Roman
--
Roman Grothausmann
Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
Bereich Funktionale Materialien
Institut für angewandte Materialforschung
Hahn-Meitner-Platz 1
D-14109 Berlin
(früher Hahn-Meitner-Institut und BESSY)
Tel.: +49-(0)30-8062-42816
Fax.: +49-(0)30-8062-43059
Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Dr. Ulrich Breuer
Sitz der Gesellschaft: Berlin
Handelsregister: AG Charlottenburg, 89 HRB 5583
More information about the vtkusers
mailing list