---
updatedAt: 2026-08-18T23:55:06.000Z
agentTools:
  projectIndex: https://docs.sparc.science/llms.txt
---

# Scaffold Mapping Tools: Using Subject-Specific Vagus (SSV) Scaffolds For Population-Level Analysis

This tutorial shows how to use the **Scaffold Mapping Tools** to visualize branching patterns of subject-specific vagus scaffolds using the vagus material coordinates.<br /><br />Vagus material coordinates, also known as vagus coordinates, are defined as a straight line along the vagal trunk, with the origin as the top of the trunk and 1 as the bottom end of the trunk. The branches are defined as lines with the same orientation as when they leave the trunk.

Mapping branches into these coordinates allows branches from different subjects to be visualized along the same trunk geometry, making it easier to locate branch origins or spatial distributions along a length scale between 0 and 1 for systematic quantification of branch behavior.

Any number of subjects can be added to the visualization. For demonstration purposes, this tutorial uses vagus scaffolds derived from two subjects (**f009**, DOI: [10.26275/un0a-zzdl](https://doi.org/10.26275/un0a-zzdl)) and **f019**, DOI: [10.26275/8ekx-tqxe](https://doi.org/10.26275/8ekx-tqxe)), from the Feinstein collection (DOI: [10.26275/2vva-qmjw](https://doi.org/10.26275/2vva-qmjw)).

By the end of this tutorial, you will learn how to:

* retrieve subject-specific vagus scaffolds from the SPARC Portal;
* map branches onto a common vagus material coordinates; and
* generate qualitative branch distribution visualizations.

***

## Step 1: Create and execute the workflow

Launch **MAP Client Mapping Tools** from the Start Menu under `MAP-Client-mapping-tools vX.Y.Z` (X, Y, and Z will be the actual version numbers).

Set up a new workflow named *SSV-vagus-coordinates* on your Desktop by
creating a new folder on the Desktop named `SSV-vagus-coordinates`. In **MAP Client Mapping Tools**, go to **File → New Workflow** (`Ctrl+Shift+N`).  Select the `SSV-vagus-coordinates` directory you just created.

To set up the organ inserter workflow, add the following steps to the workflow area and connect them as shown in **Figure 1**:

* One **Retrieve Portal Data** steps
* One **Argon Viewer** step
* One **Argon Scene Exporter** step

<Image src="https://files.readme.io/b4d2c8ffa8a46ba096cfbfd4b913ff74e8948c8ecb06c98b79b85724bf993c6a-A_vagus_coord_workflow.jpg" align="center" caption="Figure 1. Workflow for visualizing SSV scaffolds in vagus coordinates." border={true} />

### Retrieve Portal Data step

Configure the first **Retrieve Portal Data** by setting its identifier to `SSV scaffolds` as shown in **Figure 2**.

<Image src="https://files.readme.io/862b944a4d0f97254a580586b3b0428366f74fbf26639e9752f7f19872c171df-B_RPD.jpg" align="center" caption="Figure 2. Configuring the Retrieve Portal Data step." border={true} />

### Argon Scene Exporter step

Configure the **Argon Scene Exporter** step by changing Export type to `image`, the prefix to `branch_directions_left` and selecting an output directory for saving the image. Set Width and Height to 2048 in order to export a high-resolution image as shown in **Figure 3**.

<Image src="https://files.readme.io/686e1832259def4d792145e4011cab74bdf846fc50c0f5b94b9859eb2f176255-C_argon_exporter.jpg" align="center" caption="Figure 3. Configuring the Argon Scene Exporter step." border={true} />

Once the workflow is complete, save it (`Ctrl+S`) and click `Execute`.

## Step 2: Retrieve data from the SPARC Portal

In this example, we will retrieve the SSV scaffolds for the left side only but the same steps apply to generating visualizations for the right vagus.

Enter `https://doi.org/10.26275/tjzi-muqm` in the **Search term** field and click `Search`. The search results will show up in the **Search results** panel.

To filter the results to scaffold files, enter `scaffold-exf` in the **Filter** field and select `Mimetype`. Click the **Filename** header to sort the results alphabetically.

In this example, we are inserting vagus scaffolds from two subjects (**f009** and **f019**). From the list, locate the following two files:<br />`f009-left_vagus_scaffold.exf`
`f019-left_vagus_scaffold.exf`

Hold `Ctrl` while selecting both files, then click `Download`. Once the selected files are loaded in the **Provided files** panel as shown in **Figure 4**, click `Done` to proceed.

<Image src="https://files.readme.io/13c9c51be6922564bf65d82f138c304457e4ce174def35e39ef4dec407cb8669-D_RPD_step.jpg" align="center" caption="Figure 4. Retrieving and selecting SSV scaffolds." border={true} />

In the next section, we will use **Argon Viewer** to visualize the SSV scaffolds in vagus coordinates.

***

## Step 3: Visualize vagus scaffolds with vagus coordinates

### Set up view, regions and model sources

Click **Add View** to add a `Layout1` view panel.

Open the **Region Editor**. Right-click and select **Add child region** to create two child regions. Double-click each newly created region to rename them `f009` and `f019`.  The resulting region hierarchy should look like **Figure 5**.

<Image src="https://files.readme.io/6200b68919315e330bc48d6f190b03a7ad9da4c71100e520d74fb13eb03fa08d-E_Region_Editor.jpg" align="center" caption="Figure 5. Region hierarchy in Region Editor." border={true} />

Next, click the **Model Sources** tab in the top panel. Assign each scaffold file to its corresponding child region by selecting the appropriate region and then clicking the **green plus** icon, as shown in **Figure 6**.

<Image src="https://files.readme.io/83727fc904910508f84788e8e280fba18f94255572f3d9f88c1e000daae5dfc6-F_Model_sources.jpg" align="center" caption="Figure 6. Assigning scaffold files in Model Sources." border={true} />

### Create vagus nerve centroid and normalised branching directions with vagus coordinates

Next, we will set up the vagus trunk centroids. This only needs to be done once per side using any subject, since the trunks from all different subjects should be mapped to the same vagal trunk in the vagus material coordinates. In this tutorial, we will set it up for `/f009`.

Go to **Field Editor** and use the following settings to set up a field called `left vagus nerve centroid` in the **Region** for `/f009` as shown in **Figure 7**:
**Add …**: `And`
**Source Field 1**: `left vagus nerve`
**Source Field 2**: `vagus centroid`
**Name**: `left vagus nerve centroid`

<Image src="https://files.readme.io/f9f34dd73a88988f98d66836acf230f77ed5105dc820a256c1d492d28f11c201-G_left_vagus_centroid.jpg" align="center" caption="Figure 7. Creating the left vagus nerve centroid field." border={true} />

As we will be visualizing the origins and initial directions of vagal branches, we first need to create a group called `vagus nerve branches`.

For each of the vagus sub-regions (`/f009` and `/f019`), create the following field as shown in **Figure 8**:

**Add...:** `Not`<br />**Source Field**: `left vagus nerve`<br />**Name**: `left vagus nerve branches`

<Image src="https://files.readme.io/8ca0495aade9da6e522695e308483849f2bca6f343bb80bf93f7a845ed4fbc14-H_left_vagus_nerve_branches.jpg" align="center" caption="Figure 8. Creating a group for the left vagus nerve branches." border={true} />

Next, as shown in **Figure 9**, we add a **Derivative** field for the same regions with the following settings:
**Coordinate Field**: `vagus coordinates`
**xi index**: `1`
**Name**: `vc_dx_dxi1`

As the derivative of the coordinates field with respect to the first element coordinates (`xi1`) provides a vector tangent to the branch, the vector `vc_dx_dxi1` represents the local direction of the branch in the vagus coordinate system.

<Image src="https://files.readme.io/ec0ab8f8c9caead17edefe46791b75d0b919f109ee10757b61be7601d5076a38-I_vc_dx_dxi1.jpg" align="center" caption="Figure 9. Creating a derivative field representing the branch direction." border={true} />

Then, we add a **Normalise** field as shown in **Figure 10** for each of the vagus regions:
**Source Field**: `vc_dx_dxi1`
**Name**: `norm_vc_dx_dxi1`

Normalising `vc_dx_dxi1` removes its magnitude while retaining its direction. This allows it to be used to orient the glyphs later for visualization.

<Image src="https://files.readme.io/0d5342780351994622fc5ae93119275c3685cf9ccab17e3ec74ad7b7b2b36388-J_norm_vc_dx_dix1jpg.jpg" align="center" caption="Figure 10. Creating a normalised derivative field representing the branch direction." border={true} />

### Visualize branches using vagus coordinates

#### Visualize vagus trunk in vagus coordinates

Go to **Scene Editor**, and for `/f009` region, add **lines** with the following settings:
**Subgroup**: `left vagus nerve centroid`
**Coordinates**: `vagus coordinates`
**Shape**: `circle extrusion`
**Base size**: `0.01*0.01`

At this stage, the **Layout1** panel will still be empty. To display the graphics you have just created, open **Sceneviewer Editor** and click `View All`. Adjust the graphics to a comfortable viewing position using **left-click** to rotate, **middle-click** to pan and **right-click** to zoom.  From this point onward, any newly added graphic objects should appear in the view panel when they are configured correctly.

If you would like to visualize the level markers in the vagus coordinates, add **node points** with the following settings:
**Subgroup**: `marker`
**Coordinates**: `marker vagus coordinates`
**Glyph**: `line`
**Base size**: `0.5*0.5*0.5`
**Label field**: `marker_name`
**Glyph offset**: `-0.5, 0, 0`
**Label text offset**: `-0.1, 0.0, 0.0`

#### Visualize branch groups

It is often helpful to create translucent materials when visualizing multiple branch groups, as it makes it easier to see how different groups of branches interact with and overlap one another.

Go to **Material Editor**, and click `Create`. Double-click the new material and rename it to `magenta50`. Select magenta for both **Ambient Colour** and **Diffuse Colour**. Then set:
**Alpha**: `0.5`
**Shininess**: `0.2`

<Image src="https://files.readme.io/3d2a58268b29335502b55f628bca584af51f5e64254f35f8f97d66ebd958acaf-M_magenta50..jpg" align="center" caption="Figure 11. Creating a magenta50 material in Material Editor." border={true} />

Follow the same steps to create `green50`, which is a translucent version of the **green** material.

Go to `/f009` region and add **element points** to visualize the left superior laryngeal nerve with the following settings:
**Subgroup**: `left superior laryngeal nerve`
**Coordinates**: `vagus coordinates`
**Material**: `magenta50`
**Glyph**: `cylinder`
**Base size**: `0.1*0.01*0.01`
**Scale field**: `norm_vc_dx_dxi1`
**Scaling**: `0.01*0.01*0.01`

Repeat these steps for `/f019`. You should now be able to see the left superior laryngeal nerves from both **f009** and **f019** mapped onto the same vagus material coordinates.

We recommend using a translucent material, such as `magenta50`, to make it easier to identify overlapping branches. Additional vagal branch groups can also be visualized using different materials. For example, the **left cardiovascular branch of cervical vagus nerve** can be added using a different material (`green50`) to investigate how different branch groups are distributed along the vagal trunk, as shown in **Figure 12**.

Because a translucent material is being used, adjust the scene settings in **Sceneviewer Editor** by setting **Transparency mode** to `slow`.

<Image src="https://files.readme.io/919e49215f94a91b48186399367a54099e9dfb432d166050b90a04ab45960e8c-K_branch_direction.jpg" align="center" caption="Figure 12. Visualizing the left superior laryngeal nerve in magenta50 and the left cardiovascular branch of the cervical vagus nerve in green50 for subjects f009 and f019." border={true} />

### Visualize branch distribution and density

Sometimes it can be helpful to visualize branches from multiple subjects on a common coordinate system without including their branch trajectories.

In the next visualization, we will generate a qualitative representation of branch density, whereby regions where multiple branches overlap appear more prominent because of the increased opacity.

Regions where branches from multiple subjects overlap can reveal areas of consistent branching, while differences in overlap can highlight inter-subject differences. This provides a qualitative view of branch density and distribution and can help identify patterns for further quantitative analysis.

First, clear the **Layout** view by unchecking all graphic objects in **Scene Editor**.

In **Scene Editor**, select `/f009` from the **Region** and turn on visibility of the line graphic previously created for `left vagus nerve centroid` using the `vagus coordinates`.

Next, add **element points** with the following settings:
**Subgroup**: `left superior laryngeal nerve`
**Coordinates**: `vagus coordinates`
**Material**: `magenta10`
**Glyph**: `cylinder`
**Base size**: `0.2*0.01*0.01`
**Glyph offset**: `-0.5, 0.0, 0.0`

We use `magenta10` rather than `magenta50` for the density plot because `magenta10` is a more transparent version of the magenta material. This makes overlapping branches easier to identify and provides a better representation of branch density.

The `magenta10` material can be created using the same steps described previously for creating `magenta50` in the ‘Material Editor’. The only difference is to set the **Alpha** value to `0.1`.

Next, follow the same steps to add **element points** for **left cardiovascular branch of cervical vagus nerve** from **f009**. Select the appropriate branch group under **Subgroup** and use the `green10` material to visualize these branches.

Repeat these steps for any additional subjects you wish to include. In this example, repeat the process for `/f019`, adding graphics for the corresponding branch groups until you derive a visualization as shown in **Figure 13**.

<Image src="https://files.readme.io/978ba59f2cd87a21c1b72731fce130e77f09268e4f16d02c8abacf1c443acf3f-L_density_plot.jpg" align="center" caption="Figure 13. Distribution plot of the left superior laryngeal nerve (magenta10) and left cardiovascular branch of cervical vagus nerve (green10) for subjects f009 and f019, mapped using vagus coordinates." border={true} />

### Exporting the generated visualization

Once you have successfully generated the visualization required for your publication or presentation, click `Done`. This will end the workflow, and the visualization displayed in the **Layout** view will automatically be exported to the directory specified during the **Argon Scene Exporter** configuration step.

### Summary

In this tutorial, we mapped the subject-specific scaffolds to a common coordinate framework, thereby enabling comparison of branch distributions across subjects and generation of qualitative visualizations of branch density.