SCIRun / BioPSE System Overview

63
System Overview CIBC CIBC SCIRun / BioPSE System Overview SCIRun / BioPSE System Overview

Transcript of SCIRun / BioPSE System Overview

System Overview

CIBCCIBC

SCIRun / BioPSESystem OverviewSCIRun / BioPSESystem Overview

System Overview

CIBCCIBC

Problem Solving Environments (PSEs)Problem Solving Environments (PSEs)

CoreMemory MgmtProcess Mgmt

FrameworkLibraries

Modeling

Simulation AnalysisCore

PSEPSE

Chemistry Physics

Medicine

Biology

Geoscience

Astronomy

System Overview

CIBCCIBC

Integration and InteractionIntegration and Interaction

Modeling

Simulation

Visualization

userguides

What If?

System Overview

CIBCCIBC

SCIRun GoalsSCIRun Goals

Integration Extensibility

UsabilityInteractivity

Portability Utility

Modeling

Simulation AnalysisCore

SCIRunSCIRun

System Overview

CIBCCIBC

SCIRun and BioPSESCIRun and BioPSE

System Overview

CIBCCIBC

OverviewOverview• Computational Science• Problem Solving Environments• Dataflow• Datatypes• Software Organization• Extensibility• PowerApps

System Overview

CIBCCIBC

Elements of SCIRunElements of SCIRun

Visual programming Environment

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

MODULE

void execute() {// get data from ports// get data from UI// … do work …// set data on UI// send data out ports

}

System Overview

CIBCCIBC

Module StatusModule Status

• Run-time messages are sent to the module’s “log”

Startup messagesStartup messages

Log message indicatorGray: no messagesRed: errorBlue: warning/remark

Log message indicatorGray: no messagesRed: errorBlue: warning/remark

System Overview

CIBCCIBC

Example Module: CastMatrixExample Module: CastMatrix

SCIRun/src/Dataflow/Modules/Math/CastMatrix.ccGUI/CastMatrix.xmlXML/CastMatrix.xml

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

….sendget……

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI Matrix

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI Matrix

Field

ColorMapGeometry

System Overview

CIBCCIBC

Network ElementsNetwork Elements• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

– GuiVars

System Overview

CIBCCIBC

Network DesignNetwork Design• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

• Send and Get• GuiVars• Scheduler

• Dependencies• loops: send_intermediate

System Overview

CIBCCIBC

Network DesignNetwork Design• Dataflow Vocabulary

• Module• Dataport• Datapipe• UI

• Send and Get• GuiVars• Scheduler

• Dependencies• loops: send_intermediate

System Overview

CIBCCIBC

Packages and CategoriesPackages and Categories

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: SubnetsManaging Complexity: Subnets

System Overview

CIBCCIBC

Managing Complexity: AnnotationsManaging Complexity: Annotations

System Overview

CIBCCIBC

build-fem-elem-leadfield.netbuild-fem-elem-leadfield.net

System Overview

CIBCCIBC

dipole-localization-leadfield-vis.netdipole-localization-leadfield-vis.net

System Overview

CIBCCIBC

build-misfit-and-localize.netbuild-misfit-and-localize.net

System Overview

CIBCCIBC

showmatrix.netshowmatrix.net

System Overview

CIBCCIBC

show-text.netshow-text.net

System Overview

CIBCCIBC

Dataflow Datatypes RevisitedDataflow Datatypes Revisited

Matrix

Field

ColorMap

Geometry

System Overview

CIBCCIBC

Matrices: Class HierarchyMatrices: Class Hierarchy• Matrix: base class

• get, put, [ ], nrows, ncols, get_row, get_col, get_val, zero,mult, mult_transpose, print, {is_,as_,}{sparse,dense,column}, cg_solve, bicg_solve, scalar_multiply

• SparseRowMatrix• int *rows, int *cols, double *a, int nnz;

• ColumnMatrix• double *data;

• DenseMatrix• double **data;

System Overview

CIBCCIBC

Matrices: External LibrariesMatrices: External Libraries• PETSc

• Preconditioners: jacobi, bijacobi, sor, eisenstat, icc, ilu, asm, sles, lu, mg, spai,milu, nn, cholesky, ramg

• Solvers: KSRICHARDSON, PSPCHEBYCHEV, KSPGG, KSPGMRES, KSPTCQMR, KSPBCGS, KSPBGS, KSPTFQMR, KSPCR, KSPLSQR, KSPBICG, KSPPREONLY

• BLAS and Atlas• Faster linear-algebra via loop unrolling

System Overview

CIBCCIBC

Fields: Mesh + DataFields: Mesh + Data

Data

int, float, double, …

Vector, Tensor, …

basis

Data

int, float, double, …

Vector, Tensor, …

basis

Geometry

Regular

Irregular (basis)

Geometry

Regular

Irregular (basis)

PropertiesProperties

PointCloudField

ScanlineField CurveField

ImageField QuadSurfField TriSurfField

LatVolField TetVolFieldHexVolField

System Overview

CIBCCIBC

PersistencePersistence• Networks• Serialize data for disk I/O• Architecture independent

• Smart pointers• Byte swapping

• Data files are (somewhat) human readable, but should ~not~ be generated / edited by anything other than SCIRun• Use “convert” programs

System Overview

CIBCCIBC

PersistentPersistentvoidMatrix::io(Piostream& stream){

/* int version = */ stream.begin_class("Matrix", MATRIX_VERSION);PropertyManager::io(stream);stream.end_class();

}

void ColumnMatrix::io(Piostream& stream){

/* int version = */stream.begin_class("ColumnMatrix", COLUMNMATRIX_VERSION);Matrix::io(stream);

stream.io(rows);if(stream.reading()) {

data=scinew double[rows];}int i;for(i=0;i<rows;i++)

stream.io(data[i]);stream.end_class();

}

System Overview

CIBCCIBC

Example DatasetsExample Datasets

System Overview

CIBCCIBC

OverviewOverview• Computational Science• Problem Solving Environments• Dataflow• Datatypes• Software Organization• Extensibility• PowerApps

System Overview

CIBCCIBC

Source Tree OrganizationSource Tree OrganizationSCIRunSCIRun

BioPSE MatlabInterfaceBioPSE MatlabInterface

Core Dataflow StandAlone

Packages linux src docsPackages linux src docs

Core: algorithms, datatypes, math, threadsDataflow: network, modules, ports, schedulerStandAlone: converters, utilities

Core: algorithms, datatypes, math, threadsDataflow: network, modules, ports, schedulerStandAlone: converters, utilities

System Overview

CIBCCIBC

SCIRun CategoriesSCIRun CategoriesFields

• FieldsCreate– “sources” for new Fields– e.g. SampleLattice, FieldBoundary, ClipByFunction

• FieldsData– Just change data for an existing Field (Mesh untouched)– TransformFieldData, ManageFieldData, DirectMapping /

ApplyMappingMatrix• FieldsGeometry

– Just change geometry for an existing Field (Data untouched)– Unstructure, HexToTet, QuadToTri– TransformField

• FieldsOther– Miscellaneous (FieldInfo, ChooseField, FieldMeasures, …)

Visualization• ColorMaps• Isosurfaces

System Overview

CIBCCIBC

ExtensibilityExtensibility

• Leverage existing utilities• Extensibility through bridges

SCIRun

Matlab

mpeg

libimage

Teem

GENESIS

liblib

liblibsocketsocket

liblib

SQLSQL

System Overview

CIBCCIBC

Three ApproachesThree Approaches

• Data Level• Command line tools to convert files• Communicating data across sockets

• Library Level• Teem, BLAS, ITK

• Application Level• Rewrite algorithms natively in SCIRun

System Overview

CIBCCIBC

ConvertersConverters

• Convert between human-editable text (e.g. CVRTI .pts, .dat files) and SCIRun Persistent objects

• See examples in SCIRunData/convert-examples/• Each converter gives you usage info if invoked without

arguments:dmw stitch% TextToHexVolField

Usage: TextToHexVolField pts hexes HexVolMesh [-noPtsCount] [-noElementsCount] [-oneBasedIndexing] [-binOutput] [debug]

This program will read in a .pts (specifying the x/y/z coords of each point, one per line, entries separated by white space, file can have an optional one line header specifying number of points... and if it doesn't, you have to use the -noPtsCount command-line argument) and a .hex file (specifying i/j/k/l/m/n/o/p indices for each hex, also one per line, again with an optional one line header (use -noElementsCount if it's not there). The hex entries are assumed to be zero-based, unless you specify -oneBasedIndexing. And the SCIRun output file is written in ASCII, unless you specify -binOutput.

• Plug-ins for Readers / Writers

System Overview

CIBCCIBC

Data Import / ExportData Import / Export

System Overview

CIBCCIBC

MatlabInterfaceMatlabInterface

System Overview

CIBCCIBC

Three ApproachesThree Approaches

• Data Level• Command line tools to convert files

• Library Level• Teem, BLAS, ITK

• Application Level• Rewrite algorithms natively in SCIRun

System Overview

CIBCCIBC

ITK IntegrationITK Integration

System Overview

CIBCCIBC

TeemTeem

System Overview

CIBCCIBC

OverviewOverview• Computational Science• Problem Solving Environments• Dataflow• Datatypes• Software Organization• Extensibility• PowerApps

System Overview

CIBCCIBC

Managing Complexity: UIsManaging Complexity: UIs

Subnets

Annotations

System Overview

CIBCCIBC

All Modules are “Generic”All Modules are “Generic”

System Overview

CIBCCIBC

PowerApps: User-Friendly, Domain-SpecificPowerApps: User-Friendly, Domain-Specific

System Overview

CIBCCIBC

Power AppsPower Apps

System Overview

CIBCCIBC

Power AppsPower Apps

Problem specific applications•Hide the complexities of dataflow•Provide a simplified graphical user interface•Focus on a specific

Problem specific applications•Hide the complexities of dataflow•Provide a simplified graphical user interface•Focus on a specifictasktask

System Overview

CIBCCIBC

Power AppsPower Apps

Guide the user through specific processing stepsGuide the user through specific processing steps

Processing PaneProcessing Pane

System Overview

CIBCCIBC

Power AppsPower Apps

Provide different visualization optionsProvide different visualization options

Visualization PaneVisualization Pane

System Overview

CIBCCIBC

BioFEM BioFEM

Encapsulation of the forward-fem network Encapsulation of the forward-fem network

http://software.sci.utah.edu/doc/User/Tutorials/BioFEM/BioFEM.htmlhttp://software.sci.utah.edu/doc/User/Tutorials/BioFEM/BioFEM.html

• Change datasets• Streamlines• Isosurfaces• Electrodes

• Change datasets• Streamlines• Isosurfaces• Electrodes

System Overview

CIBCCIBC

BioTensorBioTensorDiffusion Tensor ImagingProcessing Steps

•Data Acquisition•Registration•Building Tensors

Visualization Options

Diffusion Tensor ImagingProcessing Steps

•Data Acquisition•Registration•Building Tensors

Visualization Options•Planes•Isosurfaces

•Planes•Isosurfaces

•Glyphs•Fibers

•Glyphs•Fibers

http://software.sci.utah.edu/doc/User/Tutorials/BioTensor/BioTensor.htmlhttp://software.sci.utah.edu/doc/User/Tutorials/BioTensor/BioTensor.html

System Overview

CIBCCIBC

BioImageBioImageVolume RenderingProcessing Steps

•Crop•Resample•Histogram Eq

Visualization Options

Volume RenderingProcessing Steps

•Crop•Resample•Histogram Eq

Visualization Options•Slices•MIPs

•Slices•MIPs

•Window Width / Level•Multi-dimensional Transfer Functions

•Window Width / Level•Multi-dimensional Transfer Functions

http://software.sci.utah.edu/doc/User/Tutorials/BioImage/BioImage.htmlhttp://software.sci.utah.edu/doc/User/Tutorials/BioImage/BioImage.html