[ITK] [ITK-users] patch to add Euler characteristic to the itkShapeLabelMapFilter

Dr. Roman Grothausmann grothausmann.roman at mh-hannover.de
Tue May 6 10:28:27 EDT 2014


Dear mailing list members,


With the help of Juan Rodríguez and some code from (Ohser, J.; Steinbach, B. & 
Lang, C. Efficient texture analysis of binary images Fraunhofer ITWM, 1998 
http://publica.fraunhofer.de/dokumente/N-46740.html) I tried to create a patch 
for itkShapeLabelMapFilter to also (optionally) calculate the Euler 
characteristic. The current patch is attached.
However, the code so far only works for 2D images and I'm looking for help how 
to extent the calculation to ND at least 3D images. The inner for-loop works for 
ND but I'm not sure how to handle the calculation of the histogram variable 
value. My guess is that an analogon for the Hexagonal-II graph is needed for 
3D/ND, possibly for 3D a 14.1/2 neighbourhood, but I could not find any 
literature for the generalization of the approach of the paper above to 3D/ND.
What would be the best way to extend the calculation to 3D/ND?

Any help or hints are very much appreciated
Roman

On 28/04/14 13:51, Dr. Roman Grothausmann wrote:
> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: itkShapeLabelMapFilter.patch
Type: text/x-patch
Size: 4670 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/community/attachments/20140506/b9a85e54/attachment.bin>
-------------- 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://www.itk.org/mailman/listinfo/insight-users


More information about the Community mailing list