Skip to content

Commit

Permalink
Merge pull request #13 from Konohana0608/update/tip_v3
Browse files Browse the repository at this point in the history
Update/tip v3
  • Loading branch information
Konohana0608 authored Jul 15, 2024
2 parents 9bc978a + d2c7ad2 commit 626a2be
Show file tree
Hide file tree
Showing 38 changed files with 432 additions and 68 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Welcome to the *TI Planning Tool* (TIP) user manual. This document provides back

<br>
<p align="center">
<img width="350" height="150" src="assets/logo.svg">
<img width="350" height="150" src="../../assets/logo.svg">
</p>
12 changes: 9 additions & 3 deletions _sidebar.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,16 @@
* [Landing Page](/docs/platform_introduction/overview.md)
* [Dashboard](/docs/platform_introduction/dashboard.md)
* [Data](/docs/platform_introduction/data.md)
* [Billing Center](/docs/platform_introduction/billing_center.md)
* [Creating a New Plan](/docs/plan/create_new_plan.md)
* [Step 1: Setup](/docs/services/electrode_selector.md)
* [Step 2: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 3: Exposure Analysis](/docs/services/s4l_post_processing.md)
* [Step 0: Preparing Your Data](/docs/services/file_picker.md)
* [Step 1: Images Processing](/docs/services/personalizer.md)
* [Step 2: Fiducials Placement](/docs/services/fiducials_placement.md)
* [Step 3: Electrode Placement](/docs/services/electrode_placement.md)
* [Step 4: EM Simulations](/docs/services/simulator.md)
* [Step 5: Setup](/docs/services/electrode_selector.md)
* [Step 6: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 7: Exposure Analysis](/docs/services/s4l_post_processing.md)
* [References](/docs/background/references.md)
* [Licensing](/docs/support/license.md)
* [IT'IS TIP](/docs/support/itis/itis_tc.md)
Expand Down
Binary file added assets/methods/personalized_head.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/TIP_v3_files-DTI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/TIP_v3_files-MRI.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/billing_center/credit_card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/billing_center/usage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/electrode_selector_2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/fiducial_placement_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/fiducial_placement_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/fiducial_placement_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/file_picker.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/personalizer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/quickguide/simulator.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion docs/background/electromagnetic_modeling.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@

The TI exposure optimization and visualization is currently based on libraries of precomputed fields for rapid answers and an interactive experience. From the precomputed fields (and associated impedance matrices), distributions of TI, as well as high frequency exposure can be obtained for any stimulation configuration, using the superposition principle.

These precomputed fields were determined using the Sim4Life software, along with detailed anatomical models, such as the MIDA model [[1]](/docs/background/references.md), the Virtual Population (ViP) models [[2]](/docs/background/references.md), and the Virtual Zoo (ViZoo) models [[3]](/docs/background/references.md). The simulations were performed using the ohmic-current-dominated electro-quasistatic simulator that solves the equation
These precomputed fields were determined using the Sim4Life software, along with detailed anatomical models, such as the MIDA model [[1]](/docs/background/references.md), the Virtual Population (ViP) models [[2]](/docs/background/references.md), and the Virtual Zoo (ViZoo) models [[3]](/docs/background/references.md). The personalized flavor allows for the computation of all electrode fields based on the desired dataset.

The simulations were performed using the ohmic-current-dominated electro-quasistatic simulator that solves the equation

<p align="center">
∇σ∇ϕ = 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ For classic TI (two channels), the total field is obtained as:


<p align="center">
<img width = "390" src="assets/equations/eq1w2.png">
<img width = "390" src="../../assets/equations/eq1w2.png">
</p>

<!--
Expand All @@ -15,10 +15,10 @@ $$
$$
-->

where <img width = "30" src="assets/equations/E12w2.png"> are the fields of the two channels and ω<sub>1,2</sub> are their angular frequencies (initial phases are set to zero without loss of generality). Its projection along a direction of interest <img width = "12" src="assets/equations/nvecw2.png"> (e.g., the principal axis of a pyramidal neuron, or the principal axis of the local diffusion tensor; <img width = "52" src="assets/equations/n1w2.png"> ) is obtained as:
where <img width = "30" src="../../assets/equations/E12w2.png"> are the fields of the two channels and ω<sub>1,2</sub> are their angular frequencies (initial phases are set to zero without loss of generality). Its projection along a direction of interest <img width = "12" src="../../assets/equations/nvecw2.png"> (e.g., the principal axis of a pyramidal neuron, or the principal axis of the local diffusion tensor; <img width = "52" src="../../assets/equations/n1w2.png"> ) is obtained as:

<p align="center">
<img width = "520" src="assets/equations/eq2w2.png">
<img width = "520" src="../../assets/equations/eq2w2.png">
</p>

<!--
Expand All @@ -27,10 +27,10 @@ $$
$$
-->

The modulation envelope magnitude (MEM) along <img width = "12" src="assets/equations/nvecw2.png"> can easily be obtained as
The modulation envelope magnitude (MEM) along <img width = "12" src="../../assets/equations/nvecw2.png"> can easily be obtained as

<p align="center">
<img width = "340" src="assets/equations/eq3w2.png">
<img width = "340" src="../../assets/equations/eq3w2.png">
</p>

<!--
Expand All @@ -41,7 +41,7 @@ $$
As TI-exposure quantity, the modulation envelope magnitude (MEM) has been chosen, which is computed according to the formula from [[5]](/docs/background/references.md):

<p align="center">
<img width = "800" src="assets/equations/eq4w2.png">
<img width = "800" src="../../assets/equations/eq4w2.png">
</p>

<!--
Expand All @@ -55,7 +55,7 @@ $$
-->


where α denotes the angle between <img width = "30" src="assets/equations/E12w2.png">. This metric has been chosen because it reproduces empirical observations, such as the neurons responding to the demodulated exposure and stimulation target moving towards the channel carrying less current when the current ratio is adapted.
where α denotes the angle between <img width = "30" src="../../assets/equations/E12w2.png">. This metric has been chosen because it reproduces empirical observations, such as the neurons responding to the demodulated exposure and stimulation target moving towards the channel carrying less current when the current ratio is adapted.

To assess the quality of a TI exposure condition, three key metrics have been defined:

Expand All @@ -68,7 +68,7 @@ Typically, it is not possible to find exposure conditions that simultaneously op
In addition to the TI-relevant MEM distribution, **high-frequency** exposure can also be of interest (e.g., to analyze potential high frequency stimulation or conduction blocking). For this, the peak field magnitude is used, which is obtained as:

<p align="center">
<img width = "470" src="assets/equations/eq5w2.png">
<img width = "470" src="../../assets/equations/eq5w2.png">
</p>

<!--
Expand Down
18 changes: 14 additions & 4 deletions docs/background/modeling_steps.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
## Planning Steps

The planning process is presented to the user in three successive steps.
- **Step 1 - Setup**: In a first step, the relevant species, stimulation target, and potential electrode locations (currently required to narrow down the huge exposure configuration search space) are selected.
- **Step 2 - Optimal Configuration Identification**: Based on extensive sweeping/optimization, a series of highly performing exposure parameters are proposed for the user to interactively explore, using predefined quantification metrics and visualizations. Identified conditions-of-interest can be documented and added to a report.
- **Step 3 - Exposure Analysis**: Finally, and optionally, exposure conditions-of-interest can be visualized and analyzed freely, using the web-version of the Sim4Life (ZMT Zurich MedTech AG, Zurich, Switzerland) computational life sciences platform.
Starting from TIP v3.0, personalized optimizations are available. The personalized flavor allows the use of magnetic resonance and/or diffusion tensor images of choice, to obtain results tailored to an individual. Note that the precomputed flavors that were available in V2.0 are still supported.

The planning process is described below for both approaches. Should the user proceed with the precomputed path, steps 1 to 5 can be disregarded and step 6 is considered the first step.

Personalized flavor only steps:
- **Step 1 - Images processing**: The so-called personalizer, either uses a T1-weighted MR image for isotropic simulations only, or a T1 in combination with DTI data to enable simulations with anisotropic conductivity in the white matter of the brain as well. Based on this data, a tissue model is generated using our AI model and anisotropic conductivity is extracted if DTI was provided.
- **Step 2 - Fiducials placement**: In this step, users can inspect the quality of the predicted tissue model and then proceed to place the fiducials' points: Nz, Iz, RPA and LPA.
- **Step 3 - Automatic electrode placement**: Based on the fiducials, the standardized 10-10 electrode system is placed on the head model and electrode templates are placed at each location. The placement of all electrode models on the head can be investigated to ensure proper positioning.
- **Step 4 - EM Simulations**: Isotropic or anisotropic simulations are automatically generated and solved. Once the the results are available, all necessary files for the optimization are exported.

Global Steps:
- **Step 5 - Setup**: In a first step, the relevant species, stimulation target, and potential electrode locations (currently required to narrow down the huge exposure configuration search space) are selected.
- **Step 6 - Optimal Configuration Identification**: Based on extensive sweeping/optimization, a series of highly performing exposure parameters are proposed for the user to interactively explore, using predefined quantification metrics and visualizations. Identified conditions-of-interest can be documented and added to a report.
- **Step 7 - Exposure Analysis**: Finally, and optionally, exposure conditions-of-interest can be visualized and analyzed freely, using the web-version of the Sim4Life (ZMT Zurich MedTech AG, Zurich, Switzerland) computational life sciences platform.

Please refer to [Quick Start Guide](/docs/plan/start.md) section for more details.

Expand Down
2 changes: 1 addition & 1 deletion docs/background/modes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## TI Modes

Since version 2.0, the _TI Planning tool_ (TIP) supports three TI modes:
Since version 2.0, the _TI Planning tool_ (TIP) supports three TI modes, which now in TIP v3.0 are available for the two flavors (non-personalized and personalized):
- **classic TI**: two sinusoidal high-frequency currents with slight frequency difference are applied, resulting in a high-frequency carrier, modulated at the low difference frequency;
- **multi-channel TI**: up to eight channels are supported, the frequency, amplitude, and relative phases of which can be freely chosen (in accordance with the hardware capabilities of the [TIBS device](https://temporalinterference.com/#topic3); TI Solutions AG, Switzerland);
- **phase-modulation TI**: up to eight channels are supported, which have the same frequency, but individual phase modulation, enabling the generation of complex modulation and pulsation schemes (in accordance with the hardware capabilities of the [TIBS device](https://temporalinterference.com/#topic3); TI Solutions AG, Switzerland).
Expand Down
66 changes: 63 additions & 3 deletions docs/material_methods/anatomical_refs.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,80 @@ TIP is designed such that it supports different head models. While the initial r

<br>
<p align="center">
<img width="500" src="assets/methods/MIDAHead.png">
<img width="500" src="../../assets/methods/MIDAHead.png">
</p>

* Shifting focus to the IXI head models, we introduce two new additions: IXI025, representing a female head model, and IXI208, corresponding to a male head model. These two models have been generated from MR images of the IXI Dataset, which contains 600 scans of healthy subjects [[8]](/docs/background/references.md). Each subject's dataset includes T1, T2, and PD-weighted images, as well as MRA images and diffusion-weighted images with 15 directions. All images were resampled to an isotropic resolution of 0.5 mm during segmentation.
IXI025, the female model, is characterized by 43 individually segmented tissues. Conversely, IXI208, the male model, contains 50 segmented tissues. The difference in the number of tissues included in the two head models is due to the segmentation of deep brain structures in the male model.

<br>
<p align="center">
<img width="500" src="assets/methods/IXI_male_model.png">
<img width="500" src="../../assets/methods/IXI_male_model.png">
</p>

* The newly introduced mouse model has been segmented from high-resolution structural magnetic resonance imaging (MRI) data obtained from the Animal Imaging Center of the Institute of Biomedical Engineering, a joint institution of the ETH Zurich and the University of Zurich. This model represents a 3-week-old male mouse and comprises a total of 67 detailed segmented tissues and organs. The model was introduced to enable researchers engaged in rodent studies, to also use TIP for the planning. Further technical details can be explored through the comprehensive documentation accessible at [[9]](/docs/background/references.md).

<br>
<p align="center">
<img width="500" src="assets/methods/mouse_model.png">
<img width="500" src="../../assets/methods/mouse_model.png">
</p>

In version 3.0, users can generate personalized head models based on a T1-weighted MR images. The tissue segmentation is automatically generated using a U-Net, which is able to delineate 29 tissues, eight of which are subcortical regions.

Here is a list of all the tissues which are segmented and their electric conductivity values which are taken directly from our material database:

<table style="width: 100%; border-collapse: separate; border-spacing: 10%;">
<tr>
<td style="padding-left: 10%; vertical-align: top;">

| Tissue Name | Elec. Conductivity [S/m] | Density [kg/m^3] |
| ---------- | --- | ----------- |
| Amygdala | 0.419055 | 1044.5 |
| Artery | 0.66246 | 1049.75 |
| Brainstem| 0.35 | 1045.5 |
| Caudate nucleus | 0.419055 | 1044.5 |
| Cerebellum gray matter | 0.419055 | 1044.5 |
| Cerebellum white matter| 0.347954 | 1041 |
| Cerebrospinal fluid | 1.879 | 1007 |
| Cerebrum gray matter | 0.419055 | 1044.5 |
| Cerebrum white matter| 0.347954 | 1041 |
| Dura | 0.06 | 1174 |
| Eyes | 2.16486 | 1004.5 |
| Globus pallidus| 0.419055 | 1044.5 |
| Hippocampus | 0.419055 | 1044.5 |
| Midbrain ventral | 0.35 | 1045.5 |
| Mucosa | 0.461008 | 1102 |

</td>
<td style="vertical-align: top;">

| Tissue Name | Elec. Conductivity [S/m] | Density [kg/m^3] |
| ---------- | --- | ----------- |
| Ocular muscle | 0.461008 | 1090.4 |
| Nerve cranial II optic | 0.347954 | 1075 |
| Nucleus accumbens| 0.419055 | 1044.5 |
| Other tissues | 0.0776213 | 911 |
| Putamen | 0.419055 | 1044.5 |
| Skin | 0.148297 | 1109 |
| Skull cancellous | 0.0804595 | 1178.33 |
| Skull cortical | 0.006302 | 1908 |
| Spinal cord | 0.610954 | 1075 |
| Thalamus | 0.475 | 1044.5 |
| Vein | 0.66246 | 1049.75 |
| Ventricles | 1.879 | 1007 |
| Vertebrae cancellous | 0.0804595 | 1178.33 |
| Vetebrae cortical | 0.006302 | 1908 |

</td>
</tr>
</table>

Since the model is trained on healthy subjects without implants/lesions/atrophy, it is recommended to use MRI data from subjects who fulfill these criteria as well.

<br>
<p align="center">
<img width="500" src="../../assets/methods/personalized_head.png">
</p>

In addition to that, users have to option to provide diffusion tensor imaging data. Based on that, an inhomogeneous, anisotropic conductivity map can be extracted using a linear relationship which has been described by D.S. Tuch [citation ...]. To use this feature, users need to provide a preprocessed DTI nifty (.nii.gz), a .bval and .bvec file. The bval file lists the b-value for each volume in the series, the bvec file the gradient direction, with one column per volume

14 changes: 10 additions & 4 deletions docs/plan/create_new_plan.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
The setup of new TI Plan can easily be initiated by clicking on the large ```New Plan``` icon on the ```Dashboard```.

<p align="center">
<img width="90%" src="assets/quickguide/newplanv2.png">
<img width="90%" src="../../assets/quickguide/newplanv2.png">
</p>

Three different kinds of planning studies can be initialized, which correspond to the [three modes](/docs/background/modes.md): _classic TI_, _multi-channel TI_, and _phase-modulation TI_.

Allow for some time for the study initiation. Once the study is ready, you will have access to the different planning steps and their views (note: some [TI modes](/docs/background/modes.md) only have two steps):
* [Step 1: Setup](/docs/services/electrode_selector.md)
* [Step 2: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 3: Exposure Analysis](/docs/services/s4l_post_processing.md)

* [Step 0: Preparing Your Data](/docs/services/file_picker.md)
* [Step 1: Images Processing](/docs/services/personalizer.md)
* [Step 2: Fiducials Placement](/docs/services/fiducials_placement.md)
* [Step 3: Electrode Placement](/docs/services/electrode_placement.md)
* [Step 4: EM Simulations](/docs/services/simulator.md)
* [Step 5: Setup](/docs/services/electrode_selector.md)
* [Step 6: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 7: Exposure Analysis](/docs/services/s4l_post_processing.md)
17 changes: 10 additions & 7 deletions docs/plan/start.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Quick Start Guide

This section starts with an [overview](/docs/platform_introduction/platform.md) of the TI Planning Tool.
First, a brief introduction of the platform itself is given, then we show how to create a new plan and the next three sections describe
the functionalities of the different services and their user interfaces within a plan.
This section starts with an [overview](/docs/platform_introduction/platform.md) of the TI Planning Tool.
First, a brief introduction of the platform itself is given, then we show how to create a new plan and the next three sections describe the functionalities of the different services and their user interfaces within a plan.
Then it provides step-by-step instructions on how to [create a new plan](/docs/plan/create_new_plan.md) by following the steps below (note: some [TI modes](/docs/background/modes.md) only have two steps):

* [Step 1: Setup](/docs/services/electrode_selector.md)
* [Step 2: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 3: Exposure Analysis](/docs/services/s4l_post_processing.md)

* [Step 0: Preparing Your Data](/docs/services/file_picker.md)
* [Step 1: Images Processing](/docs/services/personalizer.md)
* [Step 2: Fiducials Placement](/docs/services/fiducials_placement.md)
* [Step 3: Electrode Placement](/docs/services/electrode_placement.md)
* [Step 4: EM Simulations](/docs/services/simulator.md)
* [Step 5: Setup](/docs/services/electrode_selector.md)
* [Step 6: Optimal Configuration Identification](/docs/services/post_processing.md)
* [Step 7: Exposure Analysis](/docs/services/s4l_post_processing.md)
Loading

0 comments on commit 626a2be

Please sign in to comment.