brainhops.io.common
Format-specific machinery shared by the image and transformation readers.
Each subpackage holds what the image readers (brainhops.io.images) and
the transformation readers (brainhops.io.transformations) of one file
format have in common -- its parser, header, and geometry conventions:
afni: AFNI.HEAD/.BRIKdatasets;analyze: Analyze 7.5.hdr/.imgpairs (needsnibabel);bdv: BigDataViewer and BigStitcher datasets, an XML file and an HDF5 file (the images needh5py);freesurfer: the volume geometry shared by every FreeSurfer format;hdf5: formats stored in HDF5 files (needsh5py);mgh: FreeSurfer MGH/MGZ volumes (needsnibabel);minc: MINC1 and MINC2 volumes (needsnibabel, andh5pyfor MINC2);mrtrix: MRtrix.mif/.mihimages;nifti: NIfTI-1 and NIfTI-2 files (needsnibabel);nrrd: NRRD.nrrd/.nhdrfiles;zarr: Zarr stores (needsabczarrand one of its drivers).
None of them is imported here: a format whose optional dependencies are
missing must not break brainhops.io, so each one is imported by the
readers that need it, and only when those dependencies are installed.