+
+
+
+ Overview
+-
+
- Every processing node in a SCIRun dataflow network is a concrete Module subclass. +
- Ports are declared statically via
HasNInputPorts<Tag…>/HasNOutputPorts<Tag…>mix-ins using a typed tag system.
+ - Subclasses implement
execute()for compute andsetStateDefaults()for UI parameter defaults.
+ - Heavy computation is usually delegated to a separate Algo or Impl class, keeping the module thin. +
- Two important abstract intermediate bases exist: GeometryGeneratingModule (adds render-buffer integration) and ModuleWithAsyncDynamicPorts (processes inputs as they arrive). +
🏗 Framework / Core 5
+| Class | File | Description |
|---|---|---|
| DummyModule | Dataflow/Network/Module.cc | No-op placeholder used internally during testing and network loading. |
| GeometryGeneratingModule | Dataflow/Network/GeometryGeneratingModule.h | Abstract intermediate base for any module that produces geometry for rendering. Adds render-buffer integration and a GeometryPortTag output. |
| ModuleWithAsyncDynamicPorts | Dataflow/Network/ (framework) | Abstract base for modules that process inputs asynchronously as they arrive. Used by ViewScene, OsprayViewer, and GeometryBuffer. |
| SubnetModule | Interface/Application/Subnetworks.h | Wraps an entire sub-network as a single opaque module node in a parent network. |
| PlaceholderModule | Modules/Basic/PlaceholderModule.h | Stand-in for an unrecognized or removed module when loading old network files. Has no ports and does nothing. |
🎨 Visualization 14
+| Class | File | Description |
|---|---|---|
| ShowField | Modules/Visualization/ShowField.h | Primary field-rendering module. Renders a scalar/vector/tensor field as colored surfaces, edges, or nodes. Inputs: Field + optional ColorMap; output: Geometry. |
| ShowFieldGlyphs | Modules/Visualization/ShowFieldGlyphs.h | Renders vector or tensor fields as 3D glyphs (arrows, ellipsoids, superquadrics). Accepts up to 3 field+colormap pairs simultaneously. |
| ShowUncertaintyGlyphs | Modules/Visualization/ShowUncertaintyGlyphs.h | Renders glyphs sized/shaped by tensor uncertainty data. Inputs: field + matrix. |
| ShowColorMap | Modules/Visualization/ShowColorMapModule.h | Renders a color legend/scale bar in the viewer for a given ColorMap. |
| RescaleColorMap | Modules/Visualization/RescaleColorMap.h | Re-maps a ColorMap's value range to fit the actual data range of one or more input Fields. |
| ReportColorMapInfo | Modules/Visualization/ReportColorMapInfo.h | Reports metadata (range, resolution, etc.) about a ColorMap to scalar output ports. |
| CreateStandardColorMap | Modules/Visualization/CreateStandardColorMap.h | Generates a built-in named color map (rainbow, grayscale, etc.) from user parameters. |
| ShowString | Modules/Visualization/ShowString.h | Renders a text string as a 2D geometry overlay in the viewer. |
| ShowMeshBoundingBox | Modules/Visualization/ShowMeshBoundingBox.h | Visualizes the axis-aligned bounding box of a field's mesh. |
| ShowOrientationAxes | Modules/Visualization/ShowOrientationAxes.h | Renders orientation/coordinate-axis arrows derived from a field's bounding box. |
| GeometryBuffer | Modules/Visualization/GeometryBuffer.h | Collects incoming geometry objects asynchronously and distributes them across up to 8 output ports. Useful for large networks with many geometry producers. |
| MeshConstruction | Modules/Visualization/MeshConstruction.h | Helper that constructs renderable mesh geometry from a field. |
| ShowFieldWithOspray | Modules/Visualization/ShowFieldWithOspray.h | Sends field data to the OSPRay path-tracer instead of the standard OpenGL renderer. |
| CreateTestingArrow | Modules/Visualization/CreateTestingArrow.h | Generates a simple arrow geometry for testing/debugging the render pipeline. |
🖥 Rendering 2
+| Class | File | Description |
|---|---|---|
| ViewScene | Modules/Render/ViewScene.h | The primary interactive 3D OpenGL viewer. Accepts geometry asynchronously via a dynamic port; outputs camera position and orientation as matrices. The main interactive window module. |
| OsprayViewer | Modules/Render/OsprayViewer.h | Photo-realistic path-traced viewer using Intel OSPRay. Accepts OSPRay-specific geometry objects asynchronously; no output ports. |
∑ Math — Modern 21
+| Class | File | Description |
|---|---|---|
| SolveLinearSystem | Modules/Math/SolveLinearSystem.h | Solves Ax = b using iterative solvers (CG, BiCG, MINRES, etc.). Inputs: matrix A and RHS b; output: solution x. |
| SolveComplexLinearSystem | Modules/Math/SolveComplexLinearSystem.h | Same as SolveLinearSystem but for complex-valued matrices. |
| EvaluateLinearAlgebraUnary | Modules/Math/EvaluateLinearAlgebraUnary.h | Applies a user-selected unary operation (transpose, invert, negate, normalize, etc.) to one matrix. |
| EvaluateLinearAlgebraBinary | Modules/Math/EvaluateLinearAlgebraBinary.h | Applies a binary operation (add, multiply, subtract, etc.) to two matrices. |
| AppendMatrix | Modules/Math/AppendMatrix.h | Concatenates matrices by appending rows or columns. Supports a dynamic number of input matrices. |
| CreateMatrix | Modules/Math/CreateMatrix.h | Creates a matrix from values entered by the user in a text-editor UI. No input ports. |
| CreateStandardMatrix | Modules/Math/CreateStandardMatrix.h | Creates common named matrices (identity, zeros, ones, random) at a specified size. |
| CreateComplexMatrix | Modules/Math/CreateComplexMatrix.h | Creates a complex-valued matrix from two real matrices (real and imaginary parts). |
| GetMatrixSlice | Modules/Math/GetMatrixSlice.h | Extracts a single row or column from a matrix. Can be driven by a scalar index port for iteration. |
| GetSubmatrix | Modules/Math/GetSubmatrix.h | Extracts a rectangular block from a matrix by specifying row and column ranges. |
| ResizeMatrix | Modules/Math/ResizeMatrix.h | Resizes a matrix to specified dimensions by padding with zeros or truncating. |
| ReportMatrixInfo | Modules/Math/ReportMatrixInfo.h | Reports a matrix's row count, column count, and Frobenius norm to scalar output ports. |
| ReportMatrixSliceMeasure | Modules/Math/ReportMatrixSliceMeasure.h | Computes statistics (min, max, mean, etc.) over a row or column slice of a matrix. |
| ReportComplexMatrixInfo | Modules/Math/ReportComplexMatrixInfo.h | Reports metadata for complex matrices (dimensions, norms of real and imaginary parts). |
| ComputePCA | Modules/Math/ComputePCA.h | Principal Component Analysis: outputs eigenvalues, eigenvectors, and projected data as three separate matrices. |
| ComputeTensorUncertainty | Modules/Math/ComputeTensorUncertainty.h | Computes uncertainty measures from an ensemble of tensor matrices. |
| ConvertMatrixToScalar | Modules/Math/ConvertMatrixToScalar.h | Extracts a single scalar value from a 1×1 matrix. |
| ConvertScalarToMatrix | Modules/Math/ConvertScalarToMatrix.h | Wraps a scalar value in a 1×1 matrix. |
| ConvertComplexToRealMatrix | Modules/Math/ConvertComplexToRealMatrix.h | Splits a complex matrix into separate real and imaginary part matrices. |
| ConvertRealToComplexMatrix | Modules/Math/ConvertRealToComplexMatrix.h | Combines two real matrices (real and imaginary parts) into one complex matrix. |
| DisplayHistogram | Modules/Math/DisplayHistogram.h | Plots a histogram of a matrix's values in a UI window. No output ports. |
| BasicPlotter | Modules/Math/BasicPlotter.h | Plots matrix data as a time-series or XY curve. |
| AdvancedPlotter | Modules/Math/AdvancedPlotter.h | Extended version of BasicPlotter with additional display and overlay options. |
| BooleanCompare | Modules/Math/BooleanCompare.h | Compares two scalars with a relational operator; outputs the boolean result as a scalar. |
| CreateGeometricTransform | Modules/Math/CreateGeometricTransform.h | Builds a 4×4 transformation matrix (translate/rotate/scale) with an interactive 3D widget. Outputs both the matrix and a geometry object. |
∑ Math — Legacy 11
+| Class | File | Description |
|---|---|---|
| AddKnownsToLinearSystem | Modules/Legacy/Math/AddKnownsToLinearSystem.h | Applies boundary conditions to a linear system by inserting known values into A and b. |
| AddLinkedNodesToLinearSystem | Modules/Legacy/Math/AddLinkedNodesToLinearSystem.h | Couples pairs of mesh nodes together as equality constraints in a linear system. |
| BuildNoiseColumnMatrix | Modules/Legacy/Math/BuildNoiseColumnMatrix.h | Constructs a random-noise column vector of specified length and amplitude. |
| CollectMatrices | Modules/Legacy/Math/CollectMatrices.h | Accumulates matrices arriving across multiple sequential executions into one growing combined matrix. |
| ComputeSVD | Modules/Legacy/Math/ComputeSVD.h | Singular Value Decomposition; outputs U, Σ (as diagonal matrix), and V. |
| ConvertMatrixType | Modules/Legacy/Math/ConvertMatrixType.h | Converts between sparse, dense, and column matrix storage formats. |
| EvaluateLinearAlgebraGeneral | Modules/Legacy/Math/EvaluateLinAlgGeneral.h | User-scripted multi-matrix expression evaluation with up to 5 inputs and 5 outputs. |
| ReportColumnMatrixMisfit | Modules/Legacy/Math/ReportColumnMatrixMisfit.h | Computes the misfit (error norm) between two column vectors; used during iterative inverse solving. |
| SelectSubMatrix | Modules/Legacy/Math/SelectSubMatrix.h | Selects rows and columns from a matrix by an index list. |
| SetSubmatrix | Modules/Legacy/Math/SetSubmatrix.h | Inserts one matrix into a subregion of a larger matrix. |
| SolveMinNormLeastSqSystem | Modules/Legacy/Math/SolveMinNormLeastSqSystem.h | Solves an underdetermined system for the minimum-norm least-squares solution. |
🔄 Inverse Problem 5
+| Class | File | Description |
|---|---|---|
| SolveInverseProblemWithTikhonov | Modules/Legacy/Inverse/SolveInverseProblemWithTikhonov.h | Tikhonov regularized inverse: computes x = (AᵀA + λRᵀR)⁻¹Aᵀb. Outputs solution, regularized inverse, and the regularization parameter used. |
| SolveInverseProblemWithTikhonovSVD | Modules/Legacy/Inverse/SolveInverseProblemWithTikhonovSVD.h | Tikhonov inverse via pre-computed SVD factorization — faster for repeated solves at different λ values. |
| SolveInverseProblemWithTSVD | Modules/Legacy/Inverse/SolveInverseProblemWithTSVD.h | Truncated SVD inverse: discards small singular values to regularize the solution. Accepts pre-computed SVD components. |
| BuildSurfaceLaplacianMatrix | Modules/Legacy/Inverse/BuildSurfaceLaplacianMatrix.h | Builds a discrete surface Laplacian matrix from a surface mesh. Used as a spatial regularization operator in inverse problems. |
| LCurvePlot | Modules/Legacy/Inverse/LCurvePlot.h | Plots the L-curve (solution norm vs. residual norm) to help select the optimal regularization parameter λ. |
🔷 Field Operations — Modern 7
+| Class | File | Description |
|---|---|---|
| ReportFieldInfo | Modules/Fields/ReportFieldInfo.h | Reports field metadata to output ports: mesh element count, node count, data range, bounding box, mesh type, and data type. |
| EditMeshBoundingBox | Modules/Fields/EditMeshBoundingBox.h | Interactively rescales and repositions a field's bounding box via a 3D widget. Outputs transformed field, geometry, and transform matrix. |
| InterfaceWithCleaver | Modules/Fields/InterfaceWithCleaver.h | Wraps the Cleaver meshing library to generate quality tetrahedral meshes from multi-material indicator fields (dynamic port input). |
| InterfaceWithCleaver2 | Modules/Fields/InterfaceWithCleaver2.h | Cleaver 2 integration with an updated API and improved mesh quality controls. |
| RefineTetMeshLocally | Modules/Fields/RefineTetMeshLocally.h | Locally subdivides tetrahedra in a Cleaver mesh to improve spatial resolution in specific regions. |
| CalculateBundleDifference | Modules/Fields/CalculateBundleDifference.h | Computes element-wise difference between two field bundles. |
| CalculateNodeLocationFrequency | Modules/Fields/CalculateNodeLocationFrequency.h | Counts how frequently each node location appears across a set of fields. |
🔷 Field Operations — Legacy ~80
+ +Organized by function. These are the largest single category in the codebase.
+ +Mesh Geometry Transforms
+| Class | File | Description |
|---|---|---|
| AlignMeshBoundingBoxes | Legacy/Fields/ | Aligns one mesh's bounding box to match another's. |
| ScaleFieldMeshAndData | Legacy/Fields/ | Uniformly scales both mesh coordinates and field data values by a factor. |
| TransformMeshWithTransform | Legacy/Fields/ | Applies a 4×4 transform matrix to a mesh, moving all nodes. |
| ResampleRegularMesh | Legacy/Fields/ | Resamples a structured grid at a different resolution. |
| FairMesh | Legacy/Fields/ | Smooths a mesh using Laplacian or Taubin filtering. |
| CleanupTetMesh | Legacy/Fields/ | Removes degenerate elements from a tetrahedral mesh. |
| RefineMesh | Legacy/Fields/ | Subdivides mesh elements to increase resolution. |
| RegisterWithCorrespondences | Legacy/Fields/ | Computes a rigid or affine registration transform from point correspondences between two meshes. |
| FlipSurfaceNormals | Legacy/Fields/ | Reverses surface triangle winding order (flips all normals). |
| ReorderNormalCoherently | Legacy/Fields/ | Makes surface normals consistently outward- or inward-pointing. |
| MergeTriSurfs | Legacy/Fields/ | Merges multiple triangle surface meshes into a single combined mesh. |
Mesh Creation
+| Class | File | Description |
|---|---|---|
| CreateLatVol | Legacy/Fields/ | Creates a structured Cartesian (lattice volume) mesh at user-specified dimensions and bounds. |
| CreateImage | Legacy/Fields/ | Creates a 2D structured grid (image lattice) mesh. |
| GenerateElectrode | Legacy/Fields/ | Generates electrode geometry as a field for use in FEM simulations. |
Field Data Manipulation
+| Class | File | Description |
|---|---|---|
| GetFieldData | Legacy/Fields/ | Extracts a field's data values as a matrix. |
| SetFieldData | Legacy/Fields/ | Assigns matrix values as a field's data. |
| GetFieldNodes | Legacy/Fields/ | Extracts node positions as a matrix. |
| SetFieldNodes | Legacy/Fields/ | Sets mesh node positions from a matrix. |
| SetFieldDataToConstantValue | Legacy/Fields/ | Fills all field data entries with a single constant value. |
| SwapFieldDataWithMatrixEntries | Legacy/Fields/ | Replaces field data with values from a matrix (element-to-element mapping). |
| CreateFieldData | Legacy/Fields/ | Creates field data by evaluating a user-supplied function over mesh elements. |
| ApplyMappingMatrix | Legacy/Fields/ | Maps data between meshes using a pre-built mapping (interpolation) matrix. |
| BuildMappingMatrix | Legacy/Fields/ | Constructs the mapping/interpolation matrix between two meshes. |
| ApplyFilterToFieldData | Legacy/Fields/ | Applies a convolution or smoothing filter to field data values. |
| SmoothVecFieldMedian | Legacy/Fields/ | Median-filter smoothing of a vector field. |
| SetFieldOrMeshStringProperty | Legacy/Fields/ | Sets a named metadata string property on a field or mesh. |
Field Statistics & Analysis
+| Class | File | Description |
|---|---|---|
| ReportFieldGeometryMeasures | Legacy/Fields/ | Reports geometric measures: volumes, areas, and element size statistics. |
| ReportScalarFieldStats | Legacy/Fields/ | Reports min, max, mean, and standard deviation of scalar field data. |
| GetMeshQualityField | Legacy/Fields/ | Computes quality metrics (aspect ratio, Jacobian, etc.) per mesh element, returning them as a scalar field. |
| CalculateFieldDataMetric | Legacy/Fields/ | Computes a user-selected norm or metric over field data values. |
| CalculateGradients | Legacy/Fields/ | Computes gradient vectors from a scalar field using FEM interpolation. |
| CalculateVectorMagnitudes | Legacy/Fields/ | Converts a vector field to a scalar field of per-element magnitudes. |
| CalculateDistanceToField | Legacy/Fields/ | Computes the unsigned distance from each node to the nearest element of a reference field. |
| CalculateDistanceToFieldBoundary | Legacy/Fields/ | Same, but measures distance to the boundary of the reference field. |
| CalculateSignedDistanceToField | Legacy/Fields/ | Signed distance field — negative inside, positive outside the reference surface. |
| CalculateInsideWhichField | Legacy/Fields/ | For each mesh element, determines which (if any) of N reference fields contains it. |
| CalculateMeshCenter | Legacy/Fields/ | Computes the centroid (geometric center) of a mesh and outputs it as a point field. |
| CalculateMeshNodes | Legacy/Fields/ | Extracts node positions as a matrix. |
| GetCentroidsFromMesh | Legacy/Fields/ | Creates a point cloud field at element centroids. |
Clipping & Extraction
+| Class | File | Description |
|---|---|---|
| ClipFieldByFunction3 | Legacy/Fields/ | Clips mesh elements by a user-supplied algebraic function. |
| ClipFieldByMesh | Legacy/Fields/ | Clips one mesh against the boundary of another. |
| ClipVolumeByIsovalue | Legacy/Fields/ | Extracts the region of a volume field above or below a threshold isovalue. |
| ExtractSimpleIsosurface | Legacy/Fields/ | Marching-cubes isosurface extraction from a scalar volume field. |
| GetDomainBoundary | Legacy/Fields/ | Extracts the boundary surface of a labeled material domain. |
| GetFieldBoundary | Legacy/Fields/ | Extracts the geometric boundary surface of any mesh. |
| SplitFieldByConnectedRegion | Legacy/Fields/ | Separates disconnected mesh components into individual fields. |
| SplitFieldByDomain | Legacy/Fields/ | Splits a multi-material mesh into one field per material label. |
Sampling
+| Class | File | Description |
|---|---|---|
| GeneratePointSamplesFromField | Legacy/Fields/ | Generates random or regular point samples within a field's domain. |
| GeneratePointSamplesFromFieldOrWidget | Legacy/Fields/ | Same, but also accepts an interactive widget to control seed placement. |
| GenerateSinglePointProbeFromField | Legacy/Fields/ | Places a single probe point and returns the interpolated field value at that location. |
| ProjectPointsOntoMesh | Legacy/Fields/ | Projects a set of points onto the nearest surface location of a mesh. |
Conversion
+| Class | File | Description |
|---|---|---|
| ConvertFieldBasis | Legacy/Fields/ | Changes data interpolation basis (e.g., node-centered ↔ cell-centered). |
| ConvertFieldDataType | Legacy/Fields/ | Converts scalar data storage type (float/double/int). |
| ConvertHexVolToTetVol | Legacy/Fields/ | Splits hexahedral elements into tetrahedra. |
| ConvertMatricesToMesh | Legacy/Fields/ | Constructs a mesh from node-position and element-connectivity matrices. |
| ConvertMeshToPointCloud | Legacy/Fields/ | Drops all mesh connectivity, keeping only node positions as a point cloud. |
| ConvertMeshToUnstructuredMesh | Legacy/Fields/ | Converts a structured (lattice) mesh to an unstructured representation. |
| ConvertQuadSurfToTriSurf | Legacy/Fields/ | Splits quadrilateral surface elements into pairs of triangles. |
| ConvertIndicesToFieldData | Legacy/Fields/ | Maps integer index values to field data using a lookup table. |
Utilities
+| Class | File | Description |
|---|---|---|
| BuildMatrixOfSurfaceNormals | Legacy/Fields/ | Outputs surface normals for each node or element as a matrix. |
| GenerateNodeNormals | Legacy/Fields/ | Computes per-node normal vectors by averaging surrounding element normals. |
| CollectFields | Legacy/Fields/ | Accumulates fields arriving in successive executions into one growing collection. |
| RemoveUnusedNodes | Legacy/Fields/ | Removes mesh nodes not referenced by any element. |
📦 Bundle Operations 9
+Bundles are named containers that group multiple data objects together under string keys.
+| Class | File | Description |
|---|---|---|
| GetFieldsFromBundle | Legacy/Bundle/GetFieldsFromBundle.h | Extracts up to 6 named fields from a bundle to individual output ports. |
| InsertFieldsIntoBundle | Legacy/Bundle/InsertFieldsIntoBundle.h | Inserts fields (dynamic port) into a bundle under user-specified names. |
| GetMatricesFromBundle | Legacy/Bundle/GetMatricesFromBundle.h | Extracts up to 6 named matrices from a bundle. |
| InsertMatricesIntoBundle | Legacy/Bundle/InsertMatricesIntoBundle.h | Inserts matrices into a bundle under user-specified names. |
| GetColorMapsFromBundle | Legacy/Bundle/GetColorMapsFromBundle.h | Extracts named ColorMaps from a bundle. |
| GetStringsFromBundle | Legacy/Bundle/GetStringsFromBundle.h | Extracts named string values from a bundle. |
| InsertStringsIntoBundle | Legacy/Bundle/InsertStringsIntoBundle.h | Inserts string values into a bundle under user-specified names. |
| InsertEnvironmentIntoBundle | Legacy/Bundle/InsertEnvironmentIntoBundle.h | Inserts environment/system variable values into a bundle as strings. |
| ReportBundleInfo | Legacy/Bundle/ReportBundleInfo.h | Prints the contents (keys, types, sizes) of a bundle to the log. |
💾 Data I/O 11
+| Class | File | Description |
|---|---|---|
| GenericReader<H,P> | Modules/DataIO/GenericReader.h | Template base: reads a typed data file selected via UI or string port. Outputs the loaded object and the filename string. |
| GenericWriter<H,P> | Modules/DataIO/GenericWriter.h | Template base: writes a typed object to a file path specified via UI or string port. |
| ReadField | Modules/DataIO/ReadField.h | Reads SCIRun field files (.fld, .mat, VTK, etc.). Delegates to format-specific importers. |
| WriteField | Modules/DataIO/WriteField.h | Writes a field to disk in a selected format. |
| ReadBundle | Modules/DataIO/ReadBundle.h | Reads a serialized Bundle from disk. |
| WriteBundle | Modules/DataIO/WriteBundle.h | Writes a Bundle to disk. |
| ReadMatrixClassic | Modules/DataIO/ReadMatrixClassic.h | Reads a matrix from text or binary SCIRun format. |
| WriteMatrix | Modules/DataIO/WriteMatrix.h | Writes a matrix to text or binary format. |
| ReadColorMapXml | Modules/DataIO/ReadColorMapXml.h | Reads a ColorMap from an XML file; also outputs a bundle with raw color data. |
| AutoReadFile | Modules/DataIO/AutoReadFile.h | Detects file type automatically from extension and routes to either a matrix or field output port. |
| WriteG3D | Modules/DataIO/WriteG3D.h | Exports geometry data to G3D format for use with external tools. |
🔬 Finite Element Methods — Legacy 6
+| Class | File | Description |
|---|---|---|
| BuildFEMatrix | Legacy/FiniteElements/BuildFEMatrix.h | Assembles the global FEM stiffness matrix K from a field with conductivity data. Outputs both real and complex stiffness matrices. |
| BuildFESurfRHS | Legacy/FiniteElements/BuildFESurfRHS.h | Assembles the right-hand side vector for FEM surface (Neumann) source terms. |
| BuildFEVolRHS | Legacy/FiniteElements/BuildFEVolRHS.h | Assembles the RHS for volumetric source terms in a FEM formulation. |
| ApplyFEMCurrentSource | Legacy/FiniteElements/ApplyFEMCurrentSource.h | Applies current-source boundary conditions to a FEM linear system (modifies both A and b). |
| ApplyFEMVoltageSource | Legacy/FiniteElements/ApplyFEMVoltageSource.h | Applies voltage-source (Dirichlet) boundary conditions to a FEM linear system. |
| BuildTDCSMatrix | Legacy/FiniteElements/BuildTDCSMatrix.h | Builds the full system matrix for transcranial direct current stimulation (tDCS), incorporating electrode contact impedances. |
⚡ Forward Problem 4
+| Class | File | Description |
|---|---|---|
| BuildBEMatrix | Legacy/Forward/BuildBEMatrix.h | Builds a Boundary Element Method (BEM) transfer matrix from one or more closed surface meshes. Accepts a dynamic number of surface inputs. |
| CalculateCurrentDensity | Legacy/Forward/CalculateCurrentDensity.h | Computes the current density field J = σ·E from an electric potential field and a conductivity field. |
| InsertVoltageSource | Legacy/Forward/InsertVoltageSource.h | Inserts electrode voltage sources into a forward-problem field and returns the modified field and a mapping matrix. |
| CalcTMP | Legacy/Forward/CalcTMP.h | Calculates transmembrane potentials from cardiac activation times using a bidomain model. Accepts 7 matrix inputs. |
🧠 Brain Stimulation 7
+| Class | File | Description |
|---|---|---|
| ElectrodeCoilSetup | Modules/BrainStimulator/ElectrodeCoilSetup.h | Positions electrode/coil geometry on a head mesh surface. Outputs placement matrices and projected fields for downstream FEM/BEM modules. |
| SolveBiotSavart | Modules/BrainStimulator/SolveBiotSavart.h | Computes the magnetic field B induced by a current-carrying TMS coil using the Biot-Savart law. Inputs: coil geometry and domain field. |
| SetupTDCS (SetupRHSforTDCSandTMS) | Modules/BrainStimulator/SetupRHSforTDCSandTMS.h | Assembles the complete right-hand side vectors and boundary condition matrices for a tDCS or TMS FEM solve. Outputs 8 matrix/field ports. |
| GenerateROIStatistics | Modules/BrainStimulator/GenerateROIStatistics.h | Computes mean, std, min, and max of a field quantity over labeled regions-of-interest (ROIs) defined by mask fields and name strings. |
| ModelTMSCoil | Modules/BrainStimulator/ModelTMSCoil.h | Generates synthetic coil geometry for Transcranial Magnetic Stimulation from user-defined coil parameters. No input ports; outputs a field. |
| SetConductivitiesToMesh | Modules/BrainStimulator/SetConductivitiesToTetMesh.h | Assigns tissue conductivity values to tetrahedral mesh elements based on a label field and a conductivity lookup table. |
| SimulateForwardMagneticField | Modules/BrainStimulator/SimulateForwardMagneticField.h | Simulates the forward magnetic field measurement from neural current sources by integrating current density over a domain. 4 field inputs, 2 field outputs. |
🐍 Python Integration 5
+| Class | File | Description |
|---|---|---|
| InterfaceWithPython | Modules/Python/InterfaceWithPython.h | Runs a Python script inside the SCIRun network. Receives matrices, fields, and strings from dynamic input ports; returns up to 9 typed values to output ports. |
| LoopStart | Modules/Python/LoopStart.h | Marks the beginning of a Python-driven loop construct. On each iteration emits data from a metadata object to downstream modules. |
| LoopEnd | Modules/Python/LoopEnd.h | Marks the end of a loop. Collects per-iteration results back into a metadata object. |
| PythonObjectForwarder | Modules/Python/PythonObjectForwarder.h | Template helper that polls the Python interpreter for objects produced asynchronously and forwards them to typed output ports with configurable retry logic. |
| ModuleStateModifierTester | Modules/Python/ModuleStateModifierTester.h | Test/debug module that exercises the state-modification API from Python. |
💬 String Modules 8
+| Class | File | Description |
|---|---|---|
| CreateString | Modules/String/CreateString.h | Creates a literal string from user input in the UI. No input ports. |
| NetworkNotes | Modules/String/NetworkNotes.h | Stores free-text notes attached to a network file. No compute; UI only. |
| JoinStrings | Legacy/String/JoinStrings.h | Concatenates multiple strings with a user-specified separator. |
| PrintMatrixIntoString | Legacy/String/PrintMatrixIntoString.h | Formats a matrix as a human-readable string. |
| PrintStringIntoString | Legacy/String/PrintStringIntoString.h | Applies printf-style format substitution to a template string. |
| ReportStringInfo | Legacy/String/ReportStringInfo.h | Prints a string's length and content to the log output. |
| SplitFileName | Legacy/String/SplitFileName.h | Splits a file path into directory, base name, and extension components. |
| GetNetworkFileName | Legacy/String/GetNetworkFileName.h | Returns the filename of the currently loaded SCIRun network (.srn5) file. |
🔁 Converters 2
+| Class | File | Description |
|---|---|---|
| ConvertBundleToField | Legacy/Converters/ConvertBundleToField.h | Extracts a field from a bundle by a user-specified key name. |
| ConvertMatrixToString | Legacy/Converters/ConvertMatrixToString.h | Serializes a matrix to a formatted string representation. |
🧪 Basic / Testing 13
+| Class | File | Description |
|---|---|---|
| ChooseInput | Modules/Basic/ChooseInput.h | Passes through the first non-empty input from a dynamic port list (mux/selector). Supersedes the legacy ChooseMatrix module. |
| PrintDatatype | Modules/Basic/PrintDatatype.h | Prints a description of any datatype object to the log. No output ports. |
| SimulationStreamingReaderBase | Modules/Basic/SimulationReaderBaseModule.h | Base for streaming simulation data from external solvers into SCIRun. Outputs a Bundle per timestep. |
| PlaceholderModule | Modules/Basic/PlaceholderModule.h | Stand-in for removed or unrecognized modules when loading legacy network files. |
| DynamicPortTester | Modules/Basic/DynamicPortTester.h | Test module that exercises dynamic port addition and removal. |
| AsyncPortTestModule | Modules/Basic/AsyncPortTestModule.h | Tests async port execution semantics and ordering. |
| AsyncStreamingTestModule | Modules/Basic/AsyncStreamingTestModule.h | Tests streaming data delivery through async ports. |
| LoggingTester | Modules/Basic/LoggingTester.h | Exercises the module logging API. |
| NeedToExecuteTester | Modules/Basic/NeedToExecuteTester.h | Tests the "needs re-execution" caching and invalidation logic. |
| PortFeedbackTestModules | Modules/Basic/PortFeedbackTestModules.h | Tests backward (feedback) data flow between ports. |
| SendComplexScalar | Modules/Basic/SendComplexScalar.h | Test source that emits a complex scalar value. |
| ReceiveComplexScalar | Modules/Basic/ReceiveComplexScalar.h | Test sink that receives and verifies a complex scalar value. |
| CompositeModuleWithStaticPorts / …TypedStaticPorts | Modules/Basic/ | Test harnesses for composite (subnet) module port wiring. |
🌊 Legacy Visualization 2
+| Class | File | Description |
|---|---|---|
| GenerateStreamLines | Legacy/Visualization/GenerateStreamLines.h | Traces streamlines through a vector field using Runge-Kutta integration. Inputs: vector field + optional seed field. Output: curve field. Interruptible. |
| ShowAndEditDipoles | Legacy/Visualization/ShowAndEditDipoles.h | Renders dipole sources as 3D arrow geometry and allows interactive repositioning. Outputs both updated field and geometry. |
📊 Teem / NRRD 6
+Integration with the Teem library for NRRD volumetric data and DTI tractography.
+| Class | File | Description |
|---|---|---|
| ReadNrrd | Legacy/Teem/DataIO/ReadNrrd.h | Reads NRRD (Nearly Raw Raster Data) volumetric files via the Teem library. No input ports; outputs a NrrdData object. |
| ConvertNrrdToField | Legacy/Teem/Converters/ConvertNrrdToField.h | Converts a NRRD dataset to a SCIRun Field. |
| ConvertNrrdToMatrix | Legacy/Teem/Converters/ConvertNrrdToMatrix.h | Converts a NRRD dataset to a SCIRun Matrix. |
| SplitFieldIntoNrrdData | Legacy/Teem/Converters/SplitFieldIntoNrrdData.h | Splits a SCIRun field into separate NRRD arrays (coordinates and data). |
| BuildDerivedNrrdWithGage | Legacy/Teem/Misc/BuildDerivedNrrdWithGage.h | Computes derived quantities (gradients, curvatures, etc.) from a NRRD volume using Teem's Gage library. |
| ReportNrrdInfo | Legacy/Teem/Misc/ReportNrrdInfo.h | Prints metadata of a NRRD dataset (dimensions, spacing, type) to the log. |
| TendFiber | Legacy/Teem/Tend/TendFiber.h | Traces DTI fiber tractography streamlines through a tensor NRRD volume using Teem's Tend library. Output: a curve field. |
🔢 MATLAB I/O 6
+| Class | File | Description |
|---|---|---|
| ImportMatricesFromMatlab | Legacy/Matlab/DataIO/ImportMatricesFromMatlab.h | Reads matrices from a MATLAB .mat file selected by filename. Outputs up to 6 matrices. |
| ExportMatricesToMatlab | Legacy/Matlab/DataIO/ExportMatricesToMatlab.h | Writes matrices to a MATLAB .mat file. |
| ImportFieldsFromMatlab | Legacy/Matlab/DataIO/ImportFieldsFromMatlab.h | Reads SCIRun field objects stored in a MATLAB .mat file. |
| ExportFieldsToMatlab | Legacy/Matlab/DataIO/ExportFieldsToMatlab.h | Writes field objects to a MATLAB .mat file. |
| ImportDatatypesFromMatlab | Legacy/Matlab/DataIO/ImportDatatypesFromMatlab.h | Generic MATLAB import for any supported SCIRun datatype. |
| ExportDatatypesToMatlab | Legacy/Matlab/DataIO/ExportDatatypesToMatlab.h | Generic MATLAB export for any supported SCIRun datatype. |
📝 Examples 3
+| Class | File | Description |
|---|---|---|
| SortMatrix | Modules/Examples/SortMatrix.h | Example demonstrating the module API. Sorts a matrix's rows by a selected column. |
| TestModuleSimple | Modules/Examples/TestModuleSimple.h | Minimal example module with no UI — illustrates the bare minimum Module subclass. |
| TestModuleSimpleUI | Modules/Examples/TestModuleSimpleUI.h | Minimal example module with a parameter UI — shows how to wire state and UI. |
🏛 Architecture Patterns
+
+
+ All Module subclasses share this structure
+-
+
- Base class:
SCIRun::Dataflow::Networks::Module(orGeometryGeneratingModule/ModuleWithAsyncDynamicPortsfor specialized cases)
+ - Ports: declared statically as mix-in template bases —
HasNInputPorts<Tag…>/HasNOutputPorts<Tag…>
+ - Port tags:
FieldPortTag,MatrixPortTag,GeometryPortTag,ColorMapPortTag,StringPortTag,ScalarPortTag,NrrdPortTag,BundlePortTag,DatatypePortTag, and others
+ - Dynamic ports: wrapped in
DynamicPortTag<T>orAsyncDynamicPortTag<T>
+ - Compute: implemented in
execute(); UI defaults insetStateDefaults()
+ - State: parameters stored in an
AlgorithmParameter-keyed map retrieved viaget_state()
+ - Separation of concerns: heavy computation delegated to a separate Algo or Impl class, keeping the module class thin +
- Legacy vs. modern: Legacy modules under
Modules/Legacy/often have aLEGACY_BIOPSE_MODULEorCONVERTED_VERSION_OF_MODULE()macro annotation indicating the migration status
+