Skip to content

Commit

Permalink
update imat
Browse files Browse the repository at this point in the history
  • Loading branch information
dungscout96 committed Jul 25, 2024
1 parent 16b3ac4 commit 1a42c54
Show file tree
Hide file tree
Showing 41 changed files with 68 additions and 67 deletions.
3 changes: 3 additions & 0 deletions code/plugins/reformat_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ def reformat_plugin_dir(plugin_input_dir, plugin_name, order, plugin_type='wiki'
for file in files:
if file.endswith('.jpg') or file.endswith('.png'):
shutil.copyfile(os.path.join(root, file), os.path.join(plugin_output_dir, file))
# if plugin is 'imat', copy the Docs directory recursively to the output directory
if plugin_name == 'imat':
shutil.copytree(os.path.join(plugin_input_dir, 'Docs'), os.path.join(plugin_output_dir, 'Docs'), dirs_exist_ok=True)

index_file = os.path.join(plugin_output_dir, 'index.md')
shutil.copyfile(os.path.join(plugin_input_dir, 'README.md'), index_file)
Expand Down
Binary file added plugins/imat/Docs/HBM2006PosterMini.pdf
Binary file not shown.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
132 changes: 65 additions & 67 deletions plugins/std_dipoleDensity/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,66 @@ nav_order: 22
---
To view the plugin source code, please visit the plugin's [GitHub repository](https://github.com/sccn/std_dipoleDensity).

Version 0.40 Update (10/31/2018)
================================
# STUDY dipole density EEGLAB plugin

DipoleDensity, called by the function std_dipplotWithDensity or in the
EEGLAB gui under Study-\>"Plot group dipoles with density", is a
visualization tool for dipole clusters within a study set. This function
will present three different visualizations of selected clusters to
better understand their distributions throughout the brain (the clusters
must already be computed).

Note that it is possible to plot Dipole Density directly from the EEGLAB Study plot. However, this plugin offers additional functionalities.

The interface is shown here:

![Dipoledensity_ui.png](images/Dipoledensity_ui.png)

Each row of "Cluster"/"Group"/"Color" can plot a separate cluster and
any left blank will be ignored. The inputs work as follow:

| | |
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Cluster | Select a cluster to be plotted |
| Group | Select a subgroup of the cluster to plot based on study conditions |
| Color | Select a color to represent the corresponding cluster in the 3D dipole plot (third image in the lower table) |
| Slice orientation | Select the orientation in which the MRI is sliced for the tiled dipole density plot (first image in the tabel below) |
| Smoothing kernal | Select the width in mm to blurr each dipole. Default is 20mm, although that is quite heavy. 10mm provides a nice tradeoff between resolution and cluster visability. Trying multiple values here is highly suggested. This affects both the tiled and interactive images (first and second images in the lower table). |
| Slice orientation | Select the orientation in which the MRI is sliced for the tiled dipole density plot |
| Color range | Select the range of values to show in the tiled dipole density plot. To select a useful range of values, it is helpful to first plot the figures with an automatic range and then look at the colorbar. The values are quite small as the dipole density values are normalized such that the voxels of the brain sum to 1. This will affect the Interactive plot as well in a later version. |
| Plot 1 - Plot 2 | If groups are selected in the dropdown menu, a second version of the tiled dipole density figure showing the the difference in dipole densities between the groups will be created. The difference will be thresholded by using the valuethe given Thresh. The thresholding is done using uncorrected p-valuel. |
| Save plot | If checked, saves all plots excluding the interactive dipole density figures. |

The plots provided are shown below:

<table>
<tbody>
<tr class="odd">
<td><p>Tiled dipole density plot: Each cluster selected will create a tiled image of MRI slices showing the cluster densities. The orientation of the slices is chosen using "Slice Orientation" in the original pop-up interface.</p></td>
<td><p><img src="images/Dipoledensity_dipplottile.png"></p></td>
</tr>
<tr class="even">
<td><p>Interactive dipole density plot: This figure contains the same information as in the tiled dipole density plot. the interface allows the slice locations to be shifted in real time to allow for a more intuitive egometric understanding of dipole density locations.</p></td>
<td><p><img src="images/Dipoledensity_dipplotinteractive.png" width="150px" height="300px"></p></td>
</tr>
<tr class="odd">
<td><p>3D dipplot: All the dipoles from the selected clusters and groups are presented in 3D. Each cluster/group is marked by the color chosed in the user interface.</p></td>
<td><p><img src="images/Dipoledensity_dipplot3d.png"></p></td>
</tr>
</tbody>
</table>

Note: Another use of this function could be to estimate the number of
clusters to group dipoles into; although, to do so you must first create
a cluster containing all dipoles. Eventually, this will be integrated as
an option so that the extra clustering step is not necessary for this
initial analysis.

Authors: Luca Pion-Tonacini and Makoto Miyakoshi. SCCN, INC, UCSD. The function to show tiled dipole plots (mir3dplot) was written by Arnaud Delorme.

# Version history

## Version 0.40 Update (10/31/2018)

[Talairach daemon](http://www.talairach.org/index.html) (Lancaster et
al., 1997; Lancaster et al., 2000) is supported, via Christian Kothe's
Expand Down Expand Up @@ -108,28 +166,24 @@ This is how the probabilistic labels are generated.
with, then finally calculate the ratio against the total number of
the points included.

Update (05/26/2017)
===================
## Update (05/26/2017)

Used and bug in calculating dual dipole (now selects the side by
obtaining the actual x coordinate values) fixed.

Update (05/22/2017)
===================
## Update (05/22/2017)

A cluster centroid is calculated only using one of the bilateral dipoles
on the side the centoid of the single dipoles exists.

Update (03/16/2017)
===================
## Update (03/16/2017)

When (symmetrical) two dipoles are fit bilaterally (using Caterina's
fitTwoDipoles plugin, for example), mean, standard deviation, and
standard error of dipole clusters are computed only using the one on the
same side of the cluster centroid. Visualization still uses two dipoles.

Update (03/06/2017)
===================
## Update (03/06/2017)

Now crosshair is supported on the interactive browser. Also, input for
the 3-D Gaussian kernel size was changed from sigma in Gaussian equation
Expand All @@ -138,8 +192,7 @@ neuroimaging. FWHM = sigma\*2.355.

![Crosshair2.png](images/Crosshair2.png)

Update (09/13/2016)
===================
## Update (09/13/2016)

Now it returns cluster centroid standard deviation and errors as
follows.
Expand All @@ -148,59 +201,4 @@ follows.
*Standard Deviation: \[ 8 15 16\]*
*Standard Error : \[ 2 4 5\]*

What it is
==========

DipoleDensity, called by the function std_dipplotWithDensity or in the
EEGLAB gui under Study-\>"Plot group dipoles with density", is a
visualization tool for dipole clusters within a study set. This function
will present three different visualizations of selected clusters to
better understand their distributions throughout the brain (the clusters
must already be computed). The interface is shown here:

![Dipoledensity_ui.png](images/Dipoledensity_ui.png)

Each row of "Cluster"/"Group"/"Color" can plot a separate cluster and
any left blank will be ignored. The inputs work as follow:

| | |
|-------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Cluster | Select a cluster to be plotted |
| Group | Select a subgroup of the cluster to plot based on study conditions |
| Color | Select a color to represent the corresponding cluster in the 3D dipole plot (third image in the lower table) |
| Slice orientation | Select the orientation in which the MRI is sliced for the tiled dipole density plot (first image in the tabel below) |
| Smoothing kernal | Select the width in mm to blurr each dipole. Default is 20mm, although that is quite heavy. 10mm provides a nice tradeoff between resolution and cluster visability. Trying multiple values here is highly suggested. This affects both the tiled and interactive images (first and second images in the lower table). |
| Slice orientation | Select the orientation in which the MRI is sliced for the tiled dipole density plot |
| Color range | Select the range of values to show in the tiled dipole density plot. To select a useful range of values, it is helpful to first plot the figures with an automatic range and then look at the colorbar. The values are quite small as the dipole density values are normalized such that the voxels of the brain sum to 1. This will affect the Interactive plot as well in a later version. |
| Plot 1 - Plot 2 | If groups are selected in the dropdown menu, a second version of the tiled dipole density figure showing the the difference in dipole densities between the groups will be created. The difference will be thresholded by using the valuethe given Thresh. The thresholding is done using uncorrected p-valuel. |
| Save plot | If checked, saves all plots excluding the interactive dipole density figures. |

The plots provided are shown below:

<table>
<tbody>
<tr class="odd">
<td><p>Tiled dipole density plot: Each cluster selected will create a tiled image of MRI slices showing the cluster densities. The orientation of the slices is chosen using "Slice Orientation" in the original pop-up interface.</p></td>
<td><p><img src="images/Dipoledensity_dipplottile.png"></p></td>
</tr>
<tr class="even">
<td><p>Interactive dipole density plot: This figure contains the same information as in the tiled dipole density plot. the interface allows the slice locations to be shifted in real time to allow for a more intuitive egometric understanding of dipole density locations.</p></td>
<td><p><img src="images/Dipoledensity_dipplotinteractive.png" width="150px" height="300px"></p></td>
</tr>
<tr class="odd">
<td><p>3D dipplot: All the dipoles from the selected clusters and groups are presented in 3D. Each cluster/group is marked by the color chosed in the user interface.</p></td>
<td><p><img src="images/Dipoledensity_dipplot3d.png"></p></td>
</tr>
</tbody>
</table>

Note: Another use of this function could be to estimate the number of
clusters to group dipoles into; although, to do so you must first create
a cluster containing all dipoles. Eventually, this will be integrated as
an option so that the extra clustering step is not necessary for this
initial analysis.

Authors: Luca Pion-Tonacini and Makoto Miyakoshi. SCCN, INC, UCSD

The function to show tiled dipole plots (mir3dplot) was written by
Arnaud Delorme

0 comments on commit 1a42c54

Please sign in to comment.