> For the complete documentation index, see [llms.txt](https://documentation.dnanexus.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.dnanexus.com/user/jupyter-notebooks/running-dxjupyterlab/freesurfer-in-dxjupyterlab.md).

# FreeSurfer in JupyterLab

{% hint style="info" %}
JupyterLab is accessible to all users of the UK Biobank Research Analysis Platform and Our Future Health Trusted Research Environment.

A license is required to access JupyterLab on the DNAnexus Platform. [Contact DNAnexus Sales](mailto:sales@dnanexus.com) for more information.
{% endhint %}

## About FreeSurfer

​FreeSurfer is a software package for the analysis and visualization of structural and functional neuroimaging data from cross-sectional or longitudinal studies.

The FreeSurfer package comes pre-installed with the `IMAGE_PROCESSING` [feature of JupyterLab](/user/jupyter-notebooks.md#feature-options).

## FreeSurfer License Registration

To use FreeSurfer on the DNAnexus Platform, you need a valid FreeSurfer license. You can register for the FreeSurfer license at the [FreeSurfer registration page](https://surfer.nmr.mgh.harvard.edu/registration.html).

## Using the FreeSurfer License on DNAnexus

To use the FreeSurfer license, complete the following steps:

1. Upload the license text file to your project on the DNAnexus Platform.
2. Launch the JupyterLab app and specify the `IMAGE_PROCESSING` feature.
3. Once JupyterLab is running, open your existing notebook (or a new notebook) and download the license file into the `FREESURFER_HOME` directory.

The commands to download the license file are as follows:

* Python kernel: `!dx download license.txt -o $FREESURFER_HOME`
* Bash kernel: `dx download license.txt -o $FREESURFER_HOME`


---

# 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://documentation.dnanexus.com/user/jupyter-notebooks/running-dxjupyterlab/freesurfer-in-dxjupyterlab.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.
