> 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ccv.brown.edu/bnc-user-manual/standalone-tools/voxalign-automated-mr-spectroscopy-voxel-placement/quantify-voxel-overlap.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
