> For the complete documentation index, see [llms.txt](https://netstim.gitbook.io/leaddbs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://netstim.gitbook.io/leaddbs/lead-dbs/step5-optional-reconstruction-of-electrode-trajectories/reconstruction-file.md).

# Reconstruction File

The data is stored

* for BIDS version, under: derivatives/leaddbs/patientID/reconstructions/sub-patientID\_desc-reconstruction.mat&#x20;
* for classic version under the `ea_reconstruction.mat` file inside the patient directory.

There is a single variable `reco`.&#x20;

`reco.native` stores reconstruction in native postoperative space, `reco.scrf` is after subcortical refine (brainshift correction - if it was applied) and `reco.mni` stores the reconstruction in the mni space. &#x20;

`reco.native.coord`s stores the coordinates for electrode contacts. For instance, `reco.native.coords_mm{2}(3,:)` is the left (`{2}`) third lowest (`(3,:)`) contact coordinates in x, y, z in native postoperative space.&#x20;

The indexing of the contacts usually follow **the same order as defined by lead manufacture,** starting from the bottom. **For segmented contacts**, different manufacturers may have different order definition. For example, at level 2 of the directed electrode from Boston Scientific(Fig. 1), the order is 2 -> 3 -> 4 (counter-clock wise seen from top). But for Abbott, it’s 1A -> 1B -> 1C (clock wise seen from top)(Fig.2)

<figure><img src="/files/o3EJ2OZ0DmqirfZ1OLBs" alt=""><figcaption><p>Figure 1: order of directed electrodes from Boston scientific.</p></figcaption></figure>

![](/files/jIy7xwr5K6kPkHLxEOsT)Fig 2: Abbott directional lead organization.


---

# 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, and the optional `goal` query parameter:

```
GET https://netstim.gitbook.io/leaddbs/lead-dbs/step5-optional-reconstruction-of-electrode-trajectories/reconstruction-file.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
