ANTsX / ANTsPy

A fast medical imaging analysis library in Python with algorithms for registration, segmentation, and more.
https://antspyx.readthedocs.io
Apache License 2.0
586 stars 161 forks source link

ants/segmentation/label_geometry_measures.py will need updating when ANTs version is bumped #612

Open cookpa opened 2 months ago

cookpa commented 2 months ago

Physical volume of labels will be included in the output after merging

https://github.com/ANTsX/ANTs/pull/1737

Currently, label_geometry_measures.py creates this on the fly.

stnava commented 2 months ago

agree - just want the "new" version to "look like" the old one ... extra / new entries are ok but if it's possible to maintain the same naming - that would be very helpful.

cookpa commented 2 months ago

Understood

cookpa commented 2 months ago

OK used the column name "VolumeInMillimeters", Flatlanders will have to deal.

Now the only change required will be to not duplicate the "VolumeInMillimeters" column in the function, since it will already be there.

ntustison commented 2 months ago

yeah, i've seen that and i'm guessing it was my fault. would this be a problem @stnava if we fixed it?

stnava commented 2 months ago

here is the check if it will be a problem:

run :

old=ants.label_geometry_measures( some_labels, some_intensity )
new=ants.label_geometry_measures( some_labels, some_intensity, param=new_filter )
should_be_true( names(old) %in% names(new) )

are they the same? at least conceptually - that's the idea. ie if someone expects to get a variable name - they should get it and it should be correct.

cookpa commented 2 months ago

Some of the variables don't exist in the supported filter, but the ones that do are named the same now

cookpa commented 2 months ago

Further update: I added back eccentricity and Axes length. Got everything except weighted centroid now.