ANTsPy icon indicating copy to clipboard operation
ANTsPy copied to clipboard

Hotfix 380

Open rueberger opened this issue 2 years ago • 2 comments

Adds warning when raised when a label interpolator is used with an image with a suspiciously high cardinality.

A potential problem: runtime

Counting unique voxels takes about 10s on a large image (1000 x 500 x 250), due to using the 'quick' and dirty method of len(np.unique(moving)). The warning only needs a rough estimate of cardinality though. Runtime could be significantly improved using something like hyperloglog or calculating cardinality for a random sample of voxels.

rueberger avatar Jun 29 '22 01:06 rueberger

I don't think the warning should include NearestNeighbor interpolation, as that's perfectly sensible to use with grayscale images and won't tie up the system for a long period anyway.

cookpa avatar Jun 29 '22 17:06 cookpa

Multilabel should probably just be removed as its just an inferior version of GenericLabel anyways...

gdevenyi avatar Jun 30 '22 15:06 gdevenyi