Lestropie / DWI_metadata

A software tool for verifying appropriate software handling of DWI metadata
Mozilla Public License 2.0
0 stars 0 forks source link

DWI_metadata

A software tool for verifying appropriate software handling of DWI metadata

Under development

Running the tests

A Docker image is now provided that embeds all requisite functionalities and data. This can be done via eg.:

docker build . -t dwi_metadata:latest
mkdir scratch
docker run -it --rm -v $(pwd)/scratch:/scratch /main.py /data /scratch /scratch/log.log

The main.py script currently expects all relevant commands to be present in PATH. This includes the peakscheck and peaksconvert commands proposed for MRtrix3, which currently necessitates installation of the following branch: https://github.com/MRtrix3/mrtrix3/pull/2918

Software dependencies

Input data

Gradient table

The gradient table utilised in acquisition of data for this project can be found at:

https://osf.io/p96tj/

The crucial feature of this gradient table is that, for the first three non-b=0 volumes, diffusion sensitisation was applied along each of the three native axes of the Device Coordinates System (DCS): [1.0, 0.0, 0.0], then [0.0, 1.0, 0.0], then [0.0, 0.0, 1.0]. The known directions of diffusion sensitisation of these three volumes can therefore be utilised as fiducials, ensuring that no interpretation of these data from the respsective DICOM series nor subsequent image processing steps result in erroneous transformation of these vectors. The gradient table intotality is however still relatively homogeneously distributed, and can therefore be used for downstream diffusoin model fitting without bias.

Note that the directions of these vectors is predicated on the coordinate system of the scanner hardware gradients; this is not equivalent to the Right-Anterior-Superior (RAS) convention used in many neuroimaging softwares / formats.

DICOM data

The DICOM data included in the Docker image can be found at:

https://osf.io/p96tj/

Here there are 24 DWI DICOM series. These represent every single possible combination of slice encoding direction, slice order, and phase encoding direction, for non-oblique fields of view. In addition, all are isotropic acquisitions, and use a cubic Field of View (FoV); this facilitates concatenation of data across all series, provided that the data are reoriented appropriately. The contents of DICOM field SeriesDescription, as well as the names of the directories in which they are stored, also encode the slice encoding direction, slice order, and phase encoding direction; any software handling of the metadata encoding this information can therefore be cross-checked against what is known to have been acquired.

Processing

The following is a summary of the validation currently performed by this tool. It is hoped that this list will expand in the future. Every test involves verification of all 24 DICOM series.

Validation capabilities

  1. Validate gradient table as bvec / bval, based on image header transformation. Compare fiducials transformed to "real" / "scanner" space against known diffusion directions.
  2. Validate gradient table as MRtrix internal "dw_scheme". Image header transformation is irrelevant in this case, given that gradient directions are defined with respect to "real" / "scanner" space. Compare fiducials against known diffusion directions.
  3. Validate slice encoding metadata, based on image header transformation. This may involve both SliceEncodingDirection and SliceTiming, given that a temporal reversal of the slice timing vector and an inversion of the slice encoding direction are equivalent operations. Additionally, the relevant metadata may be stored internally within an image header, or it could be stored in a sidecar metadata file. Direction based on image axis identifier / signedness compared to SeriesDescription.
  4. Validate phase encoding direction, based on image header transformation. Additionally, the relevant metadata may be stored internally within an image header, or it could be stored in a sidecar metadata file. Direction based on image axis identifier / signedness compared to SeriesDescription.
  5. Validate interpretation of estimated fibre orientations. If these orientations can be appropriately transformed into "real" / "scanner" space for interpretation by MRtrix3, then the mean reconstructed streamline length should be longer than those cases where such transformation is incorrect.

Software validations


RS (@Lestropie) is a fellow of the National Imaging Facility, a National Collaborative Research Infrastructure Strategy (NCRIS) capability, at the Florey Institute of Neuroscience and Mental Health.