alex-reardon / siqc

Apache License 2.0
0 stars 0 forks source link

nibabel vs ants.image #2

Open stnava opened 11 months ago

stnava commented 11 months ago

why choose nibabel as a foundation for these operations?

I dont see any functions that do anything that's more than trivial. also, I believe the approach to rotating images isn't correct ( uses the header only - that actually doesn't rotate the data )

in comparison - see https://gist.github.com/ntustison/12a656a5fc2f6f9c4494c88dc09c5621#data-augmentation which is a much richer set of approaches

the only thing that is "missing" in the ants examples is remove slices - but that's almost too trivial to implement ie you just subset the image along whatever axis.

also - keep in mind that ants ( nibabel too ) support numpy ops. eg

>>> a=img.numpy()
>>> ants.from_numpy(a)
# should copy image info correctly into the results of ants.from_numpy

comments welcome.

LMFonville commented 11 months ago

Thanks, looks like antspynet has pretty much everything we'd need? Nibabel was easier to start working with locally and test some simple (trivial) functions. We'll take a look at implementing ants and antspynet instead of nibabel.