Skip to content

Commit 7da5705

Browse files
committed
More #1461
1 parent 1f9ca46 commit 7da5705

File tree

8 files changed

+50
-717
lines changed

8 files changed

+50
-717
lines changed

src/Modules/BrainStimulator/ElectrodeCoilSetup.h

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright (c) 2015 Scientific Computing and Imaging Institute,
77
University of Utah.
88
9-
9+
1010
Permission is hereby granted, free of charge, to any person obtaining a
1111
copy of this software and associated documentation files (the "Software"),
1212
to deal in the Software without restriction, including without limitation
@@ -26,22 +26,22 @@
2626
DEALINGS IN THE SOFTWARE.
2727
*/
2828
///@file ElectrodeCoilSetup
29-
///@brief With this module the user is able to position tDCS electrodes and TMS coils to setup a simulation scenario.
30-
///
29+
///@brief With this module the user is able to position tDCS electrodes and TMS coils to setup a simulation scenario.
30+
///
3131
///
3232
///@author
3333
/// Moritz Dannhauer
3434
///
3535
///@details
3636
/// The module gets the triangulated scalp surface as the first input and a matrix of possible locations as the second. The third and any following input fields (dynamic input ports)
3737
/// are considered to be prototypes of electrodes or TMS coils that need to be positioned. After the first execution using a minimum of 3 (valid) inputs the positions appear as table rows
38-
/// in the GUI. The GUI allows to assign a prototype (first table column), normal direction etc. as well as the type of stimulation (second table column). Based on the choices made in the
38+
/// in the GUI. The GUI allows to assign a prototype (first table column), normal direction etc. as well as the type of stimulation (second table column). Based on the choices made in the
3939
/// first (prototype, "Input #") and second column (stimulation type, "Type") information are gathered from the rest of the row. An defined tDCS electrode or TMS coil will be moved using
4040
/// its location ("X","Y","Z"), its normal ("NX","NY","NZ") and can be rotated along its normal by the angle table cell defined in degrees. Throughout this table, multiple electrodes and TMS coils
4141
/// can be located at their final destinations. For a tDCS electrode specification, the placed and oriented prototype (contains electrode dimension) is used to cut the scalp that is covered by the
42-
/// electrode. This piece of scalp and its normals are used to generate the electrode sponge shape by using the thickness table parameter. The module contains three outputs: 1) the averaged scalp
42+
/// electrode. This piece of scalp and its normals are used to generate the electrode sponge shape by using the thickness table parameter. The module contains three outputs: 1) the averaged scalp
4343
/// sponge locations (+thickness, as a DenseMatrix) which are designed to be the last input of the SetupTDCS module, 2) a collection of all valid tDCS electrodes and 3) a collection of all
44-
/// valid TMS coil inputs that are represented by rotated points and dipole normals approximating the magnetic field.
44+
/// valid TMS coil inputs that are represented by rotated points and dipole normals approximating the magnetic field.
4545

4646
#ifndef MODULES_BRAINSTIMULATOR_ELECTRODECOILSETUP_H
4747
#define MODULES_BRAINSTIMULATOR_ELECTRODECOILSETUP_H
@@ -66,17 +66,18 @@ class SCISHARE ElectrodeCoilSetupModule : public SCIRun::Dataflow::Networks::Mod
6666

6767
virtual void execute();
6868
virtual void setStateDefaults();
69-
69+
7070
virtual bool hasDynamicPorts() const override { return true; }
71-
71+
7272
INPUT_PORT(0, SCALP_SURF, LegacyField);
7373
INPUT_PORT(1, LOCATIONS, Matrix);
74-
INPUT_PORT_DYNAMIC(2, ELECTRODECOILPROTOTYPES, LegacyField);
74+
INPUT_PORT_DYNAMIC(2, ELECTRODECOILPROTOTYPES, LegacyField);
7575
OUTPUT_PORT(0, ELECTRODE_SPONGE_LOCATION_AVR, Matrix);
7676
OUTPUT_PORT(1, MOVED_ELECTRODES_FIELD, LegacyField);
7777
OUTPUT_PORT(2, FINAL_ELECTRODES_FIELD, LegacyField);
7878
OUTPUT_PORT(3, COILS_FIELD, LegacyField);
79-
79+
80+
NEW_BRAIN_STIMULATOR_MODULE
8081
};
8182

8283
}}}

src/Modules/BrainStimulator/GenerateROIStatistics.h

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright (c) 2015 Scientific Computing and Imaging Institute,
77
University of Utah.
88
9-
9+
1010
Permission is hereby granted, free of charge, to any person obtaining a
1111
copy of this software and associated documentation files (the "Software"),
1212
to deal in the Software without restriction, including without limitation
@@ -26,27 +26,27 @@
2626
DEALINGS IN THE SOFTWARE.
2727
*/
2828

29-
///@file
29+
///@file
3030
/// GenerateROIStatisticsModule.cc
31-
///@brief
31+
///@brief
3232
/// This module allows to perform statistical analysis of simulation results and is part of the BrainStimulator package.
33-
///
33+
///
3434
///@author
3535
/// Moritz Dannhauer
3636
///
3737
///@details
3838
/// The GUI presents two tables that are functionally different.
39-
/// First, the upper table is for output only and presents any statistical results where each ROI is one row in the table. In its default state the module will analyze
40-
/// and present results for all ROIs that are correctly provided as inputs. Second, the lower table is meant to be able to define an individual ROI based on several critia (location,
39+
/// First, the upper table is for output only and presents any statistical results where each ROI is one row in the table. In its default state the module will analyze
40+
/// and present results for all ROIs that are correctly provided as inputs. Second, the lower table is meant to be able to define an individual ROI based on several critia (location,
4141
/// material label number and a radius that defines a spherical ROI around it). Once valid parameter are provided (in lower table, e.g. radius > 0) the results will be presented in the upper table after
4242
/// module execution.
4343
/// Two inputs have to be provided to be able to run the module it. The first input is a field that contains the simulation data defined on a mesh (tested with tetrahedra) elements.
4444
/// The third input represents the atlas that is identical in terms of geometry but contains label numbers (>0) to define anatomical regions. The anatomical regions can be used to
4545
/// compute descriptive statistics (avr., stddev., min, max). All other inputs are optional. You can provide anatomical names as a string (separated by ";", e.g. region1;region2) that must be ordered
4646
/// in a way that they match up with the ordered label numbers. An addtional (latvol) input can be provided to define a coordinate space to query anatomical statistics of common
4747
/// and self-defined neurological spaces such as Talairach or MNI space. The module is therefore generic since any anatomical data are provided by inputs only.
48-
/// Using the second and seventh input, GUI labels describing the analysis (the physical unit the first input is in; the name of the cordinate space system that is used) can be provided.
49-
/// The user is responsible for providing appropriate inputs that are registered etc.
48+
/// Using the second and seventh input, GUI labels describing the analysis (the physical unit the first input is in; the name of the cordinate space system that is used) can be provided.
49+
/// The user is responsible for providing appropriate inputs that are registered etc.
5050
/// You can use the tutorial walkthrough and example networks to explore its functionality.
5151

5252
#ifndef MODULES_BRAINSTIMULATOR_GenerateROIStatistics_H
@@ -77,9 +77,10 @@ class SCISHARE GenerateROIStatisticsModule : public SCIRun::Dataflow::Networks::
7777
INPUT_PORT(3, AtlasMeshLabels, String);
7878
INPUT_PORT(4, CoordinateSpace, LegacyField);
7979
INPUT_PORT(5, CoordinateSpaceLabel, String);
80-
80+
8181
OUTPUT_PORT(0, StatisticalResults, Matrix);
8282

83+
NEW_BRAIN_STIMULATOR_MODULE
8384
};
8485

8586
}}}

src/Modules/BrainStimulator/SetConductivitiesToTetMesh.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright (c) 2015 Scientific Computing and Imaging Institute,
77
University of Utah.
88
9-
9+
1010
Permission is hereby granted, free of charge, to any person obtaining a
1111
copy of this software and associated documentation files (the "Software"),
1212
to deal in the Software without restriction, including without limitation
@@ -35,7 +35,7 @@
3535
/// Moritz Dannhauer
3636
///@details
3737
/// The SetConductivitiesToTetMesh module uses a single field input and assigns conductivities to output field that are provided by the GUI elements to work in the BrainStimulator environment (uses SI units).
38-
/// The module looks for the numbers in round brackets (range visible in GUI) of the input field and sends them to the algorithm to be converted to the conductivities (specified in GUI).
38+
/// The module looks for the numbers in round brackets (range visible in GUI) of the input field and sends them to the algorithm to be converted to the conductivities (specified in GUI).
3939
///
4040

4141
#ifndef MODULES_BRAINSTIMULATOR_SetConductivitiesToTetMesh_H
@@ -60,6 +60,8 @@ class SCISHARE SetConductivitiesToMesh : public SCIRun::Dataflow::Networks::Modu
6060

6161
INPUT_PORT(0, InputField, LegacyField);
6262
OUTPUT_PORT(0, OutputField, LegacyField);
63+
64+
NEW_BRAIN_STIMULATOR_MODULE
6365
};
6466

6567
}}}

src/Modules/BrainStimulator/SetupRHSforTDCSandTMS.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright (c) 2015 Scientific Computing and Imaging Institute,
77
University of Utah.
88
9-
9+
1010
Permission is hereby granted, free of charge, to any person obtaining a
1111
copy of this software and associated documentation files (the "Software"),
1212
to deal in the Software without restriction, including without limitation
@@ -27,23 +27,23 @@
2727
*/
2828

2929
///@file SetupRHSforTDCSandTMS
30-
///@brief
31-
/// This module sets up TDCS problem by providing the right hand side vector (controlled by GUI) and inputs for the modules: AddKnownsToLinearSystem, BuildTDCSMatrix.
30+
///@brief
31+
/// This module sets up TDCS problem by providing the right hand side vector (controlled by GUI) and inputs for the modules: AddKnownsToLinearSystem, BuildTDCSMatrix.
3232
///
3333
///@author
3434
/// Moritz Dannhauer, Spencer Frisby
3535
///
3636
///@details
3737
/// .The module gets 4 inputs the tetrahedral mesh (first), triangle surfaces (as part of the first input) for the scalp (second) and electrodes sponges (third) as well as the a matrix (output of ElectrodeCoilSetup)
38-
/// that contains the center location and thickness of the electrode sponge. The first output contains the knowns (reference zeros node) of the linear system (third input of AddKnownsToLinearSystem).
38+
/// that contains the center location and thickness of the electrode sponge. The first output contains the knowns (reference zeros node) of the linear system (third input of AddKnownsToLinearSystem).
3939
/// The zero potential node is set to be the first mesh node by default, which can be chosen arbitrarily in the GUI by the user. The second until fifth output prepares the inputs for the BuildTDCSMatrix module that
4040
/// combines the FEM stiffness matrix with the boundary conditions of the complete electrode model. The electrical impedances can be provided in the GUI for each electrode individually.
41-
/// The module needs to identify the surface of the sponge which makes up the major part of the algorithmic module implementation.
42-
/// The sixth output creates the right hand side (RHS) vector that can be provided by the GUI. The electrical charges (ingoing and outgoing current intensities) need to sum up zero.
41+
/// The module needs to identify the surface of the sponge which makes up the major part of the algorithmic module implementation.
42+
/// The sixth output creates the right hand side (RHS) vector that can be provided by the GUI. The electrical charges (ingoing and outgoing current intensities) need to sum up zero.
4343
/// If you execute the module once the module will graphically only present the number of electrodes defined in the input data.
4444
/// The complete electrode model solves the nodal and electrode potentials in an agumented linear system the potential solution (output of SolveLinearSystem) needs to adjuested.
45-
/// Therefore, a seventh output is provided that contains the relevant indeces to be used for the module 'SelectSubMatrix'.
46-
/// Since the identification of the contact surface between electrode sponge and the electrode itself (the sponge surface top is assumed to be that) is a difficult geometrical process the eighth
45+
/// Therefore, a seventh output is provided that contains the relevant indeces to be used for the module 'SelectSubMatrix'.
46+
/// Since the identification of the contact surface between electrode sponge and the electrode itself (the sponge surface top is assumed to be that) is a difficult geometrical process the eighth
4747
/// output provides a triangle mesh that can be used for visual inspection (->ShowField->ViewScene).
4848

4949
#ifndef MODULES_BRAINSTIMULATOR_SetupRHSforTDCSandTMS_H
@@ -72,7 +72,7 @@ class SCISHARE SetupTDCS : public SCIRun::Dataflow::Networks::Module,
7272
INPUT_PORT(1, SCALP_TRI_SURF_MESH, LegacyField);
7373
INPUT_PORT(2, ELECTRODE_TRI_SURF_MESH, LegacyField);
7474
INPUT_PORT(3, ELECTRODE_SPONGE_LOCATION_AVR, Matrix);
75-
75+
7676
OUTPUT_PORT(0, LHS_KNOWNS, Matrix);
7777
OUTPUT_PORT(1, ELECTRODE_ELEMENT, Matrix);
7878
OUTPUT_PORT(2, ELECTRODE_ELEMENT_TYPE, Matrix);
@@ -81,6 +81,8 @@ class SCISHARE SetupTDCS : public SCIRun::Dataflow::Networks::Module,
8181
OUTPUT_PORT(5, RHS, Matrix);
8282
OUTPUT_PORT(6, SELECTMATRIXINDECES, Matrix);
8383
OUTPUT_PORT(7, ELECTRODE_SPONGE_SURF, LegacyField);
84+
85+
NEW_BRAIN_STIMULATOR_MODULE
8486
};
8587

8688
}}}

src/Modules/BrainStimulator/SimulateForwardMagneticField.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
Copyright (c) 2015 Scientific Computing and Imaging Institute,
77
University of Utah.
88
9-
9+
1010
Permission is hereby granted, free of charge, to any person obtaining a
1111
copy of this software and associated documentation files (the "Software"),
1212
to deal in the Software without restriction, including without limitation
@@ -63,10 +63,11 @@ class SCISHARE SimulateForwardMagneticFieldModule : public SCIRun::Dataflow::Net
6363
INPUT_PORT(1, ConductivityTensor, LegacyField);
6464
INPUT_PORT(2, DipoleSources, LegacyField);
6565
INPUT_PORT(3, DetectorLocations, LegacyField);
66-
66+
6767
OUTPUT_PORT(0, MagneticField, LegacyField);
6868
OUTPUT_PORT(1, MagneticFieldMagnitudes, LegacyField);
6969

70+
LEGACY_BIOPSE_MODULE
7071
};
7172

7273
}}}

0 commit comments

Comments
 (0)