[vtkusers] Euler Characteristic of "filled" objects

Dr. Roman Grothausmann grothausmann.roman at mh-hannover.de
Mon Apr 28 07:51:51 EDT 2014


Dear mailing list members,


I'd like to calculate the Euler Characteristic 
(http://en.wikipedia.org/wiki/Euler_characteristic) of "filled" objects 
(represented in binary 3D images).
Using vtkThreshold I get a vtkUnstructuredGrid containing vtkPoints and vtkCells 
of type VTK_Voxel.

To calculate the Euler Characteristic Xi of the "unfilled" objects I'd do:
xiu= numPoints - numEdges + numFaces;
(all values based on the output of vtkGeometryFilter for with numFaces==number 
of 2D cells)

(e.g. xiu for a unfilled Cube/Voxel:
8 verts - 12 edges + 6 faces
= 2 == 1 connected_Component - 0 handles + 1 cavity)


To calculate the Euler Characteristic Xi of the "unfilled" objects I'd do:
xif= numPoints - numEdges + numFaces - numVoxel;
(all values based on the output of vtkThreshold directly)

(e.g. xif for a filled Cube/Voxel:
8 verts - 12 edges + 6 faces - 1 volumeElement
= 1 == 1 connected_Component - 0 handles + 0 cavity)


Getting the number of Edges is easily done with vtkExtractEdges but how can I 
get the number of Faces if no face-cells exist in the output of vtkThreshold?
Is there kind of vtkExtractFaces, which (unlike vtkGeometryFilter) extracts also 
the faces of 3D-cells fully contained in the inside of the vtkUnstructuredGrid?
Do I have to create the 6 faces for each VTK_Voxel manually?
And if so, how can I prevent the creation of duplicate faces or merge these in a 
second step?
Or is there a far easier way to calculate the Euler Characteristic of "filled" 
objects represented in binary 3D images?

In another try I used ITK with itkQuadEdgeMesh, which does support Orientations 
but seemingly no 3D cells, so I guess it won't be easy to get the number of 
volume elements there for the calculation of xif.

Any help or hints are very much appreciated
Roman



-- 
Dr. Roman Grothausmann

Tomographie und Digitale Bildverarbeitung
Tomography and Digital Image Analysis

Institut für Funktionelle und Angewandte Anatomie, OE 4120
Medizinische Hochschule Hannover
Carl-Neuberg-Str. 1
D-30625 Hannover

Tel. +49 511 532-9574


More information about the vtkusers mailing list