> For the complete documentation index, see [llms.txt](https://docs.ccv.brown.edu/bnc-user-manual/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ccv.brown.edu/bnc-user-manual/standalone-tools/voxalign-automated-mr-spectroscopy-voxel-placement/quantify-voxel-overlap.md).

# Quantify voxel overlap

## Calculate dice coefficient

Voxalign also has a built-in function to verify the accuracy of longitudinal voxel placement. This tool takes as input session 1 and session 2 T1 and spectroscopy DICOMs or NIFTIs, coregisters the two T1s and applies the same transform to the session 1 spectroscopy voxel, and then calculates the dice coefficient between the two spectroscopy voxels. A dice coefficient of 1 reflects perfect overlap.

<figure><img src="/files/IeTOlLHalag67xCrwQKn" alt="Voxalign multi-session voxel placement results. Light blue is the session 1 voxel and the dark blue outline is the session 2 voxel outline."><figcaption><p>Voxalign multi-session voxel placement results. Light blue is the session 1 voxel and the dark blue outline is the session 2 voxel outline.</p></figcaption></figure>

1. Launch the dice coefficient GUI with `dice-coef`
2. Click "Select output folder" and choose a folder. If you previously ran `dice-coef` for this same participant, you can choose the same output folder and the skull-stripped T1s and linear coregistration will be re-used.
3. Provide all other files.
4. Click "Calculate dice coefficient"
5. The dice coefficient will be printed to the terminal, and a fsleyes window will be opened, with the coregistered T1s and MRS voxels overlaid.
