diff --git a/code/plugins/reformat_plugin.py b/code/plugins/reformat_plugin.py index a9861a5..64aa71a 100644 --- a/code/plugins/reformat_plugin.py +++ b/code/plugins/reformat_plugin.py @@ -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) diff --git a/plugins/imat/Docs/HBM2006PosterMini.pdf b/plugins/imat/Docs/HBM2006PosterMini.pdf new file mode 100644 index 0000000..f034c0a Binary files /dev/null and b/plugins/imat/Docs/HBM2006PosterMini.pdf differ diff --git a/plugins/imat/Cluster.png b/plugins/imat/Docs/figs/Cluster.png similarity index 100% rename from plugins/imat/Cluster.png rename to plugins/imat/Docs/figs/Cluster.png diff --git a/plugins/imat/Cluster1dipoledensity_RestEC.png b/plugins/imat/Docs/figs/Cluster1dipoledensity_RestEC.png similarity index 100% rename from plugins/imat/Cluster1dipoledensity_RestEC.png rename to plugins/imat/Docs/figs/Cluster1dipoledensity_RestEC.png diff --git a/plugins/imat/Cluster2dipoledensity_RestEC.png b/plugins/imat/Docs/figs/Cluster2dipoledensity_RestEC.png similarity index 100% rename from plugins/imat/Cluster2dipoledensity_RestEC.png rename to plugins/imat/Docs/figs/Cluster2dipoledensity_RestEC.png diff --git a/plugins/imat/Cluster3dipoledensity_RestEC.png b/plugins/imat/Docs/figs/Cluster3dipoledensity_RestEC.png similarity index 100% rename from plugins/imat/Cluster3dipoledensity_RestEC.png rename to plugins/imat/Docs/figs/Cluster3dipoledensity_RestEC.png diff --git a/plugins/imat/Clusterspectra_RestEC.png b/plugins/imat/Docs/figs/Clusterspectra_RestEC.png similarity index 100% rename from plugins/imat/Clusterspectra_RestEC.png rename to plugins/imat/Docs/figs/Clusterspectra_RestEC.png diff --git a/plugins/imat/ICIMspectogramSTUDY.png b/plugins/imat/Docs/figs/ICIMspectogramSTUDY.png similarity index 100% rename from plugins/imat/ICIMspectogramSTUDY.png rename to plugins/imat/Docs/figs/ICIMspectogramSTUDY.png diff --git a/plugins/imat/ICspectogram.png b/plugins/imat/Docs/figs/ICspectogram.png similarity index 100% rename from plugins/imat/ICspectogram.png rename to plugins/imat/Docs/figs/ICspectogram.png diff --git a/plugins/imat/ICspectogramSTUDY.png b/plugins/imat/Docs/figs/ICspectogramSTUDY.png similarity index 100% rename from plugins/imat/ICspectogramSTUDY.png rename to plugins/imat/Docs/figs/ICspectogramSTUDY.png diff --git a/plugins/imat/IMA.png b/plugins/imat/Docs/figs/IMA.png similarity index 100% rename from plugins/imat/IMA.png rename to plugins/imat/Docs/figs/IMA.png diff --git a/plugins/imat/IMA_decomposition.png b/plugins/imat/Docs/figs/IMA_decomposition.png similarity index 100% rename from plugins/imat/IMA_decomposition.png rename to plugins/imat/Docs/figs/IMA_decomposition.png diff --git a/plugins/imat/IMIC3backprojection.png b/plugins/imat/Docs/figs/IMIC3backprojection.png similarity index 100% rename from plugins/imat/IMIC3backprojection.png rename to plugins/imat/Docs/figs/IMIC3backprojection.png diff --git a/plugins/imat/IMICbackprojection.png b/plugins/imat/Docs/figs/IMICbackprojection.png similarity index 100% rename from plugins/imat/IMICbackprojection.png rename to plugins/imat/Docs/figs/IMICbackprojection.png diff --git a/plugins/imat/IMbackprojection.png b/plugins/imat/Docs/figs/IMbackprojection.png similarity index 100% rename from plugins/imat/IMbackprojection.png rename to plugins/imat/Docs/figs/IMbackprojection.png diff --git a/plugins/imat/IMclustering.png b/plugins/imat/Docs/figs/IMclustering.png similarity index 100% rename from plugins/imat/IMclustering.png rename to plugins/imat/Docs/figs/IMclustering.png diff --git a/plugins/imat/IMspectogramSTUDY.png b/plugins/imat/Docs/figs/IMspectogramSTUDY.png similarity index 100% rename from plugins/imat/IMspectogramSTUDY.png rename to plugins/imat/Docs/figs/IMspectogramSTUDY.png diff --git a/plugins/imat/IMspectralweights.png b/plugins/imat/Docs/figs/IMspectralweights.png similarity index 100% rename from plugins/imat/IMspectralweights.png rename to plugins/imat/Docs/figs/IMspectralweights.png diff --git a/plugins/imat/IMtimecourseSTUDY.png b/plugins/imat/Docs/figs/IMtimecourseSTUDY.png similarity index 100% rename from plugins/imat/IMtimecourseSTUDY.png rename to plugins/imat/Docs/figs/IMtimecourseSTUDY.png diff --git a/plugins/imat/IMweightbackprojection.png b/plugins/imat/Docs/figs/IMweightbackprojection.png similarity index 100% rename from plugins/imat/IMweightbackprojection.png rename to plugins/imat/Docs/figs/IMweightbackprojection.png diff --git a/plugins/imat/IndependentModulators.png b/plugins/imat/Docs/figs/IndependentModulators.png similarity index 100% rename from plugins/imat/IndependentModulators.png rename to plugins/imat/Docs/figs/IndependentModulators.png diff --git a/plugins/imat/PlotClusters2.png b/plugins/imat/Docs/figs/PlotClusters2.png similarity index 100% rename from plugins/imat/PlotClusters2.png rename to plugins/imat/Docs/figs/PlotClusters2.png diff --git a/plugins/imat/Precluster.png b/plugins/imat/Docs/figs/Precluster.png similarity index 100% rename from plugins/imat/Precluster.png rename to plugins/imat/Docs/figs/Precluster.png diff --git a/plugins/imat/RunIMA.png b/plugins/imat/Docs/figs/RunIMA.png similarity index 100% rename from plugins/imat/RunIMA.png rename to plugins/imat/Docs/figs/RunIMA.png diff --git a/plugins/imat/SuperimposedICmodes.png b/plugins/imat/Docs/figs/SuperimposedICmodes.png similarity index 100% rename from plugins/imat/SuperimposedICmodes.png rename to plugins/imat/Docs/figs/SuperimposedICmodes.png diff --git a/plugins/imat/SuperimposedIMmodes.png b/plugins/imat/Docs/figs/SuperimposedIMmodes.png similarity index 100% rename from plugins/imat/SuperimposedIMmodes.png rename to plugins/imat/Docs/figs/SuperimposedIMmodes.png diff --git a/plugins/imat/clusterIMs.png b/plugins/imat/Docs/figs/clusterIMs.png similarity index 100% rename from plugins/imat/clusterIMs.png rename to plugins/imat/Docs/figs/clusterIMs.png diff --git a/plugins/imat/envECSTUDY.png b/plugins/imat/Docs/figs/envECSTUDY.png similarity index 100% rename from plugins/imat/envECSTUDY.png rename to plugins/imat/Docs/figs/envECSTUDY.png diff --git a/plugins/imat/envEOSTUDY.png b/plugins/imat/Docs/figs/envEOSTUDY.png similarity index 100% rename from plugins/imat/envEOSTUDY.png rename to plugins/imat/Docs/figs/envEOSTUDY.png diff --git a/plugins/imat/envSTUDY.png b/plugins/imat/Docs/figs/envSTUDY.png similarity index 100% rename from plugins/imat/envSTUDY.png rename to plugins/imat/Docs/figs/envSTUDY.png diff --git a/plugins/imat/plotIMdecompSTUDY.png b/plugins/imat/Docs/figs/plotIMdecompSTUDY.png similarity index 100% rename from plugins/imat/plotIMdecompSTUDY.png rename to plugins/imat/Docs/figs/plotIMdecompSTUDY.png diff --git a/plugins/imat/plotenv_EC.png b/plugins/imat/Docs/figs/plotenv_EC.png similarity index 100% rename from plugins/imat/plotenv_EC.png rename to plugins/imat/Docs/figs/plotenv_EC.png diff --git a/plugins/imat/plotenv_studyEC.png b/plugins/imat/Docs/figs/plotenv_studyEC.png similarity index 100% rename from plugins/imat/plotenv_studyEC.png rename to plugins/imat/Docs/figs/plotenv_studyEC.png diff --git a/plugins/imat/plotenv_studyEO.png b/plugins/imat/Docs/figs/plotenv_studyEO.png similarity index 100% rename from plugins/imat/plotenv_studyEO.png rename to plugins/imat/Docs/figs/plotenv_studyEO.png diff --git a/plugins/imat/plotspecdecomp.png b/plugins/imat/Docs/figs/plotspecdecomp.png similarity index 100% rename from plugins/imat/plotspecdecomp.png rename to plugins/imat/Docs/figs/plotspecdecomp.png diff --git a/plugins/imat/plotspecenv.png b/plugins/imat/Docs/figs/plotspecenv.png similarity index 100% rename from plugins/imat/plotspecenv.png rename to plugins/imat/Docs/figs/plotspecenv.png diff --git a/plugins/imat/plottimecourse.png b/plugins/imat/Docs/figs/plottimecourse.png similarity index 100% rename from plugins/imat/plottimecourse.png rename to plugins/imat/Docs/figs/plottimecourse.png diff --git a/plugins/imat/runSTUDYIMA.png b/plugins/imat/Docs/figs/runSTUDYIMA.png similarity index 100% rename from plugins/imat/runSTUDYIMA.png rename to plugins/imat/Docs/figs/runSTUDYIMA.png diff --git a/plugins/imat/summedICbackprojection.png b/plugins/imat/Docs/figs/summedICbackprojection.png similarity index 100% rename from plugins/imat/summedICbackprojection.png rename to plugins/imat/Docs/figs/summedICbackprojection.png diff --git a/plugins/imat/timecourseSTUDY.png b/plugins/imat/Docs/figs/timecourseSTUDY.png similarity index 100% rename from plugins/imat/timecourseSTUDY.png rename to plugins/imat/Docs/figs/timecourseSTUDY.png diff --git a/plugins/std_dipoleDensity/index.md b/plugins/std_dipoleDensity/index.md index b146abe..b57796a 100644 --- a/plugins/std_dipoleDensity/index.md +++ b/plugins/std_dipoleDensity/index.md @@ -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: + + + + + + + + + + + + + + + + +

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.

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.

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.

+ +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 @@ -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 @@ -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. @@ -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: - - - - - - - - - - - - - - - - -

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.

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.

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.

- -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