Volume class
Vicom provides the Volume datastructure as our central representation of 3D MRI data.
It contains all relevant data and metadata a typical MRI can have.
The data is stored in a numpy array in the attribute data.
Spatial information is stored in an affine matrix in the attribute affine.
This structure is based on the nifti format (see Image formats for more information).
Metadata tags
The volume class includes a lot of attributes which are based on the standard DICOM tags. For a detailed information about most tags see DICOM Standard Browser. Some additional tags, not included in DICOM, are the following:
volume.spacing: The spacing between the voxels in mm in all dimensions.volume.image_plane: The plane in which the image is located. Can be 'transversal', 'coronal' or 'sagittal', 'isotropic' or 'unknown'.volume.current_scheme: The current coordinate system scheme of the volume data. Can be 'RAS' (default) or 'LPH'.volume.voxel_volume: The volume of a single voxel in mm³.
Validation
Additionally to a basic pydantic validation, every volume is also validated to ensure a standardization accross volumes. This includes for now:
- Image orientation: All volumes are orientated in the same way relative to a reference coordinate space (see Handling of NIfTI files for more information).
- Ordering of axes: Volumes' data is potentially reordered to always have data in the order (sagittal, coronal, transversal). This is done to ensure a standardization of the data but is different from most other standards!
- Spatial metadata: Volumes always include spatial metadata such as spacing, image_plane, FOV etc.