This hook adds Diffusion Tensor Imaging (DTI) support to BrkRaw, providing both conversion and quality-control tools for diffusion datasets.
- Automatically exports .bval and .bvec files (FSL format) alongside the converted NIfTI image.
- Correctly reorients diffusion gradient vectors (bvecs) from the logical acquisition frame to the image frame (RAS+) using the affine.
- Adds a dedicated DTI tab to the BrkRaw Viewer.
- DTI Calculation: Performs real-time tensor fitting using Ordinary Least Squares (OLS).
- Visualization:
- Fractional Anisotropy (FA)
- Mean Diffusivity (MD)
- Directionally Encoded Color FA (DEC-FA)
- DEC-FA QC: Enables immediate visual verification of gradient orientation:
- Red: Left-Right (L-R)
- Green: Anterior-Posterior (A-P)
- Blue: Superior-Inferior (S-I)
The hook is automatically applied to scans with diffusion directions (PVM_DwNDiffDir > 0).
brkraw convert /path/to/study -s 10Open the BrkRaw Viewer and select a DTI scan. A DTI tab will appear under the Extensions panel.
Tip: Right-click the extensions tab to detach it into a separate window for easier inspection.
- Click Calculate DTI.
- Wait for the tensor fitting to complete.
- Use the dropdown menu to switch between FA, MD, DEC-FA, and b0 views.
pip install .
brkraw hook install dti