I’d like to create a few subclasses for BIDSImage
with methods for querying modality-specific information, e.g.:
>>> dwi_img.bvals
[ 0. 500. 500. 1000. ...]
I was wondering if there was a way to monkey-patch this behavior into BIDSImage classes produced by BIDSLayout? I’m aware of obj.__class__ = SubClass
. When I tested this about a year ago, I found it obliterated some of the indexed metadata in BIDSImage
.