seung-lab / connected-components-3d

Connected components on discrete and continuous multilabel 3D & 2D images. Handles 26, 18, and 6 connected variants; periodic boundaries (4, 8, & 6)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Additional metrics support

drusmanbashir opened this issue · comments

Hi,
I am benefiting from this amazing library in my deep learning research, namely detecting and measuring liver tumours in CT scans. It would be great if we could have a features allowing unitless longest dimension, surface area metrics to be computed as well. Getting volume is easy since the functions already return voxel counts for labels.

Hi!

I'm glad this library is helpful! Total surface area is a good idea. You can get that by manipulating the output of contacts, but a dedicated function would be ideal. Longest dimension is a bit out of scope, but I think you can get it from performing a principal components analysis for example using scikit-learn:

https://scikit-learn.org/stable/modules/generated/sklearn.decomposition.PCA.html

Will

Closing due to lack of activity. Please re-open if you'd like more info.