Designed especially for neurobiologists, FluoRender is an interactive tool for multi-channel fluorescence microscopy data visualization and analysis.
Deep brain stimulation
BrainStimulator is a set of networks that are used in SCIRun to perform simulations of brain stimulation such as transcranial direct current stimulation (tDCS) and magnetic transcranial stimulation (TMS).
Developing software tools for science has always been a central vision of the SCI Institute.
scirun
Modeling   Simulation   Visualization

SCIRun is a Problem Solving Environment (PSE), for modeling, simulation and visualization of scientific problems. SCIRun now includes the biomedical components formally released as BioPSE, as well as BioMesh3D.

download 4

download 5
Source Code

SCIRun Toolkit
forward-inverse-mod brain-stimulator-mod


Overview
Specifications
User Documentation
Developer Documentation
FAQ
Support
SCIRun Data

Overview

SCIRun is a problem solving environment or "computational workbench" in which a user selects software modules that can be connected in a visual programing environment to create a high level workflow for experimentation. Each module exposes all the available parameters necessary for scientists to adjust the outcome of their simulation or visualization. The networks in SCIRun are flexible enough to enable duplication of networks and creation of new modules.



Many SCIRun users find this software particularly useful for their bioelectric field research. Their topics of investigation include cardiac electro-mechanical simulation, ECG and EEG forward and inverse calculations, modeling of deep brain stimulation, electromyography calculation, and determination of the electrical conductivity of anisotropic heart tissue. Users have also made use of SCIRun for the visualization of breast tumor brachytherapy, computer aided surgery, teaching, and a number of non-biomedical applications.

 

 

SCIRun Acknowledgement
SCIRun License
CIBC Acknowledgment
Contributors


Acknowledgement: SCIRun is an Open Source software project that is principally funded through the SCI Institute's NIH/NIGMS CIBC Center. Please use the following acknowledgment and send us references to any publications, presentations, or successful funding applications that make use of NIH/NIGMS CIBC software or data sets.

"This project was supported by the National Institute of General Medical Sciences of the National Institutes of Health under grant numbers P41 GM103545 and R24 GM136986.”

 

 

SCIRun Citation: [bibtex citation] [Endnote citation]

 

SCIRun License

SCIRun is available for free and is open source under the MIT License:

The MIT License

Copyright (c) 2014 Scientific Computing and Imaging Institute,
University of Utah.

Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.

 


NIH/NIGMS Center for Integrative Biomedical Computing Acknowledgment

CIBC software and the data sets provided on this web site are Open Source software projects that are principally funded through the SCI Institute's NIH/NIGMS CIBC SCIRun License For us to secure the funding that allows us to continue providing this software, we must have evidence of its utility. Thus we ask users of our software and data to acknowledge us in their publications and inform us of these publications.

"This project was supported by the National Institute of General Medical Sciences of the National Institutes of Health under grant numbers P41 GM103545 and R24 GM136986.”


Steve Parker, David Weinstein, Marty Cole, Michael Callahan, McKay Davis, J. Davison de St. Germain, Yarden Livnat, Allen Sanderson, Darby Van Uitert, Jenny Simpson, Chris Moulding, Ted Dustman, Rob MacLeod, Blythe, Nobleman, John McCorquodale, Keming Zhang, Kurt Zimmerman, Kostadin Damevski, Alexei Samsonov, Erik Kuehne, Peter-Pike Sloan, Oleg Portniaguine, James Bigler, Wayne Witzel, Bryan Worthen, David Hart, Chris Butson, Sascha Moehrs, Lisa Durbeck, John Schmidt, Richard Coffey, Jesse Hall, Nick Benson, Randy Jones, Rob Van Uitert, Kai Li, Yesim Seringagoglu, Lorena Kreda, Alireza Ghodrati, Saeed Babaeizadeh, Jeroen Stinstra, Erik Anderson, Jason Shepherd, Frank Sachse, Darrell Swenson, Ayla Khan, Burak Erem, Andrew Keely, Kristen Zygmunt, Jess Tate, Brett Burton, Mike Steffen, Tom Fogal, Josh Blauer, Ran Tao, Daniel White, Moritz Dannhauer, Jovana Knežević, Josh Levine, Jaume Coll-Font, James Hughes, Ben Larsen, Spencer Frisby, Collin Tate, Shankar Sastry, Dafang Wang.

Specifications

Graphics cards must support OpenGL 2.0 or greater (not available on older Intel embedded graphics cards). 


Binary installers are available for Windows and Mac OS X.


SCIRun 4 must be compiled from source on Linux platforms (OpenSuSE, Ubuntu, CentOS/RHEL, Fedora etc.) and requires at least the following:

  • GCC 4 compiler
  • CMake 2.8 or greater
  • NVIDIA card and drivers for Linux


Consult the distribution-specific section for additional package information and the developer documentation for build instructions.

Prerequisites


Windows
Mac OS X
SuSE
Ubuntu
CentOS

 

SCIRun 4 will install on 32-bit and 64-bit Windows XP, Vista and 7.

SCIRun volume rendering requires OpenGL 2.0, and will likely not work on integrated graphics chips.
NVIDIA and AMD graphics cards are strongly recommended.

X11


The SCIRun 4 application will run on OS X 10.5 - 10.7 with the default X11 application.

OS X 10.12 (Sierra) - 10.8 (Mountain Lion)

SCIRun 4 on OS X 10.8+ requires that the XQuartz application be installed. Download the XQuartz application from https://www.xquartz.org/releases/index.html.

Testing has shown that using SCIRun on OS X 10.8+ with some AMD video cards will trigger a bug that will cause the display to become severely disrupted.

SCIRun 4 can be used safely with AMD FirePro D500 cards shipped with Mac Pros running OS X Sierra (10.12) and El Capitan (10.11) and XQuartz 2.7.11.



OpenSuSE regression platform


We are currently testing on OpenSuSE 13.1 (OpenSuSE package repository information).

 

SCIRun 4.7 is recommended for systems that install GCC 4.7 and later. SCIRun 4.6 and earlier in the 4.x series are not currently compatible with GCC 4.7 due to a Boost build error.

 

OpenSuSE RPMs

These RPMs have been verified OpenSuSE 13.x:

  • gcc
  • gcc-c++
  • Make
  • CMake
  • glu-devel
  • libXmu-devel

Optional RPMs

  • CMake-gui 

 

CMake

CMake 2.8 or greater is required to build SCIRun 4.6 and later (CMake 2.6 or greater can be used for older versions).

 

Subversion

If working with SCIRun from Subversion, install the appropriate Subverison package. Version 1.6 or greater is recommended.

 

Older OpenSuSE distributions

There may be some variation in CMake and Subversion versions available for older platforms.

If building Subversion from source, ssh must be enabled.




Ubuntu regression platform


Installing graphics drivers from the manufacturer is strongly recommended (NVIDIA cards are recommended for Linux in general). Testing has shown that the default drivers provided by Ubuntu are not compatible with SCIRun.

We are currently testing on Ubuntu 13.04 and 12.04 LTS on systems with NVIDIA graphics cards.

We usually build SCIRun 4 using the GCC C++ compiler, so we recommend installing the package that provides that compiler.

 

Ubuntu comes with a relatively minimal install, so several packages are required.

 

Ubuntu 14.x and 13.x packages

Tested on Ubuntu 14.04 LTS and 13.04. It is easy to get the necessary packages listed below via the Synaptic package manager or the command line instructions below: 

sudo apt-get install cmake-qt-gui cmake-curses-gui build-essential \
                     libxft-dev libxi-dev libxmu-headers freeglut3-dev \
                     libtiff4-dev

 

SCIRun 4.6 and earlier in the 4.x series are not currently compatible with GCC 4.7 due to a Boost build error. This has been fixed in SCIRun 4.7.

SCIRun 4.6 and earlier can be built on Ubuntu with GCC 4.6 from the gcc-4.6, g++-4.6 packages. To use with build.sh, set environment variables CC and CXX, for example in bash:

 

export CC=/usr/bin/gcc-4.6

export CXX=/usr/bin/g++-4.6. 
 

CMake

CMake 2.8 or greater is required to build SCIRun 4.6 and later (CMake 2.6 or greater can be used for older versions).

 

Subversion

If working with SCIRun 4 checked out from Subversion, install the appropriate Subverison package. Version 1.6 or greater is recommended.



CentOS support


We do not actively develop for, or routinely test on CentOS. We do, however, deploy CentOS VirtualBox guest OS installations for occasional testing.

This list of dependencies should work for CentOS 6.2, but we haven't tested extensively on that platform yet.

SCIRun 4 is also known to compile on comparable Red Hat Enterprise Linux distributions.


CentOS 5.5 packages


The following packages were installed on a default CentOS 5.5 installation and used for our test builds. The subversion package can be omitted if not checking out code from our subversion repository.

  • gcc
  • gcc-c++
  • make (may already be installed)
  • libXft-devel
  • libXmu-devel
  • libGLU-devel (Install the libGLU-devel package that corresponds to the libGLU runtime library installed on your system. We installed mesa-libGLU-devel.)


For the CentOS 5.5 64-bit test installation, 64-bit versions of the listed packages were used.

CMake

CMake 2.8 or greater is required to build SCIRun 4.6 and later (CMake 2.6 or greater can be used for older versions).

 

Subversion

If working with SCIRun 4 from Subversion, install the appropriate Subverison package. Version 1.6 or greater is recommended.





User Documentation

The following tabs contain information designed for users interested in learning more about how to use SCIRun.

Installation
Tutorials
Modules


SCIRun 4 Installation Manual


SCIRun installation manualpdf button

 




Module Reference

 

SCIRun

SCIRun Modules: Contains reference documentation on all modules inside the Core of SCIRun
 

Packages (stable)

BioPSE Modules: This extension package has modules for doing bioelectic field calculations
MatlabInterface Modules: This extension package contains an interface to Matlab
Teem Modules: This extension package contains an interface to the Teem library
 

Packages (experimental)

Insight Modules: This extension package contains an interface to the Insight ToolKit
 

Packages (deprecated)

CardioWaveInterface Modules: This extension package contains an interface to the CardioWave simulator
ModelCreation Modules: A sandbox containing modeling and meshing tools that ultimately will be integrated in the core of SCIRun
 

Renaming Modules


Two major changes to the SCIRun network files have occurred since 1.24. First, we switched our nets from Tcl-based .net files to XML-based .srn (SCIRun Network) files. You can still load .net files, but can only save in the .srn XML format. We strongly suggest you convert your .net files to the new .srn format. We also changed how modules are named and categorized.

We also changed the names of all of the modules (and many of the categories) to use a more consistent / intuitive naming schemepdf button . This change renders old .net files non functional. However you can convert the old .net files to the new .srn format in a few steps:

  1. Copy your old .net file to .net.old so you have the original. The conversion script will overwrite your input file.
  2. Convert the .net module names with the provided script.
  3. Convert the .net to .srn with the scirun executable. The -c option loads an old tcl based .net file, writes the new xml based .srn file and exits.

 

Converting Network Files


Example: To convert myoldnetwork.net:


cp myoldnetwork.net myoldnetork.net.old
python SCIRun/src/scripts/remap_modules_in_net.py myoldnetwork.net SCIRun/src/scripts/module-remapping.txt
./scirun -c myoldnetwork.net

Then you can run your newly converted .srn file like so:


./scirun myoldnetwork.srn



Update Module Names

Similarly for users who have been using SCIRun since the switch to .srn, there is a script for converting module names in any .srn files the new naming scheme.

  1. Copy the old .srn file to .srn.old. The script will overwrite the input file.
  2. Convert the .srn to the new module names with the provided script.

Example: To convert myoldnetwork.srn :


cp myoldnetwork.srn myoldnetork.srn.old
python SCIRun/src/scripts/remap_modules_in_srn.py myoldnetwork.srn SCIRun/src/scripts/module-remapping.txt


This script can also run recursively on entire directory stuctures of .srn files by providing a path to the directory instead of to an individual file.
For example, if you have all your nets in /user/joe/mynetworkfiles/ :



python SCIRun/src/scripts/remap_modules_in_srn.py /user/joe/mynetworkfiles SCIRun/src/scripts/module-remapping.txt





Developer Documentation

For our more advanced users, we have provided information on how to develop your own modules and access more detailed information on current modules for SCIRun 4.

 SCIRun Developer Guidepdf button

Linear Algebra in SCIRun 4
General Build Information
Build on Windows
Build on Mac OS X
Build on Linux




Linear Algebra in SCIRun 4

Solvers

Parallelized Algorithms


Declared in SCIRun/src/Core/Algorithms/Math/ParallelAlgebra/ParallelLinearAlgebra.h. Implemented in SCIRun/src/Core/Algorithms/Math/LinearSystem/SolveLinearSystem.cc.

Iterative Solvers

  • CG
  • BICG
  • MINRES
  • Jacobi

Preconditioners

  • Jacobi (currently the only option available)

Regularization


Implemented in SCIRun/src/Packages/BioPSE/Dataflow/Modules/Inverse modules.

Lapack Wrappers


DenseMatrix member functions


Declared in SCIRun/src/Core/Datatypes/DenseMatrix.h. Implemented in SCIRun/src/Core/Datatypes/DenseMatrix.cc.

  • DenseMatrix::svd
    • calls SCIRun::lapacksvd
  • DenseMatrix::eigenvalues, eigenvectors
    • calls SCIRun::lapackeigen
  • DenseMatrix::invert
    • calls SCIRun::lapackinvert

Lapack wrapper functions

Other


CBLAS calls


  • DenseMatrix::mult will call cblas_dgemm if CBLAS is available and built with WITH_CBLAS, otherwise will use our own implementation.






How To Build SCIRun 4 From Source


SCIRun 4 sources can be be obtained from the dowload link or from the Subversion repository.

SCIRun 5 sources can be downloaded from the GitHub repository. The build process for SCIRun 5 is different for SCIRun 4. Documentation is available on the GitHub site.

Patches


GCC 3.x

SCIRun 4.2 and later will not compile with GCC 3.x compilers.

Download this SCIRun 4.3 source archive or apply this patch to build from source with a GCC 3.x compiler. Please note that we are no longer testing with GCC 3.x compilers, so we cannot guarantee backward compatibility in future releases.

If working from Subversion, change to SCIRun directory, and apply the patch.


patch -p 0 -i SCIRun_4.x_gcc3.x-patch-20100303.patch 

Subversion Sources


SCIRun 4 is hosted on the SCI GForge portal.

The SCIRun 4 Subversion repository can be found on the GForge project site (the repository can be browsed from the project site).


CMake


Use CMake 2.8 or greater.

To build LaTeX documentation, turn on the CMake variable BUILD_DOCUMENTATION.

To build with Tetgen support enabled, turn on the CMake variable WITH_TETGEN (should be on by default in SCIRun 4.4 and greater).

To test with CTest, turn on the CMake variable BUILD_TESTING.





Build Script for *nix Platforms (includes Mac OS X)


build.sh command line script is supplied with SCIRun sources to simplify the SCIRun 4 build process, and is recommended for users who do not need to use CMake to customize their SCIRun 4 installation beyond the options offered in the script.
Usage information is available using the --help flag.

The build.sh script will configure a GNU make build using CMake.

Typical build steps if, for example, building from a source download:


tar xzvf SCIRun_4.6_20120809_linux.tgz
./build.sh --release
cd bin
./scirun


Building from Subversion sources is similar. Go to the SCIRun directory in the Subversion local copy and run the build script as shown.

The following commands show how to checkout the SCIRun Subversion repository and build using the build script:


svn checkout --username anonymous https://gforge.sci.utah.edu/svn/cibc/cibc/trunk SCIRun_trunk


Developers with SCI or SCI collaborator accounts should use their SCI login names instead of anonymous if commit permissions are needed.

CMake can be used to further customize the build if needed.






Windows



SCIRun 4 is built using Microsoft Visual Studio project files generated by CMake. We recommend using the CMake GUI; the configuration variables listed under the General Build Information tab and others can be changed through the GUI interface. See the SCIRun Developer Guide for more detailed instructions.

To build SCIRun 4 from Subversion, install a Windows Subversion client, for example TortoiseSVN.

Visual Studio 9 2008

We are currently building 32 bit and 64 bit versions of SCIRun for Windows using Visual Studio 2008. We recommend installing Visual Studio Professional Edition or better for 64 bit builds. Visual Studio 2008 Express works fine for 32 bit builds.

For building SCIRun 32-bit and 64-bit Releases, use the CMake GUI to configure separate Visual Studio projects: a 32-bit project using the Visual Studio 2008 generator and a 64-bit project using the Visual Studio 2008 Win64 generator.

Visual Studio 2010

SCIRun 4 does not build with Visual Studio 2010.


LaTeX Documentation

Requires MiKTeX for building PDF documents from LaTeX sources.

LAPACK

To build with LAPACK support enabled if a compatible LAPACK library is not already installed, turn on the CMake variable BUILD_NETLIB (should be on by default in SCIRun 4.6 and greater), which will build the default Netlib LAPACK library shipped with SCIRun.






Mac OS X


CMake Projects

CMake Xcode projects are not supported by the SCIRun 4 OS X build, due to issues with the Tcl/Tk libraries.

Use the build.sh script is recommended, or configure a GNU make project using CMake.

Xcode

Xcode 4.x

Xcode installers from 4.3 onward do not install command line tools by default, but they can be installed after the main Xcode package has been installed. See New Features in Xcode 4.3 for more details and instructions.

Possible CMake Issues on OS X 10.7 (Lion)
The following warning may be seen while trying to configure a CMake project on OS X Lion:


xcode-select: Error: No Xcode folder is set. Run xcode-select -switch to set the path to the Xcode folder.


To fix the error, the following should work:


sudo /usr/bin/xcode-select -switch /Applications/Xcode.app/Contents/Developer/


Xcode 4.5.x

If running into build problems with C code with recent versions of XCode (4.5.x), use gcc as the C compiler instead of cc (clang C compiler) by setting the CC environment variable, for example in bash:

export CC=/usr/bin/gcc

LaTeX Documentation

Requires a LaTeX to PDF compiler for building PDF documents from LaTeX sources; we recommend MacTex.

LAPACK

LAPACK support is enabled by default and the build is configured to use the libraries supplied by Apple.
To customize the build, use ccmake or the CMake GUI to configure the build in the SCIRun/bin directory and change CMake variables as needed.






Linux


Linux software prerequisites can be found under the Specifications tab, organized by distribution.

Using the build.sh command line script supplied with SCIRun sources is recommended, or configure a GNU make project using CMake.

LaTeX Documentation

Requires a LaTeX to PDF compiler pdflatex for building PDF documents from LaTeX sources.

LAPACK

To build with LAPACK support enabled if a compatible LAPACK library is not already installed, turn on the CMake variable BUILD_NETLIB (should be on by default in SCIRun 4.6 and greater), which will build the default Netlib LAPACK library shipped with SCIRun.



FAQ

Frequently Asked Questions 

 

Datasets


What are the details of the Utah Torso Dataset?

First, the original source of the geometry was MRI, as you have read. However, our interest in the bone data came later, and they were not visible enough in the MRI to extract from there. Instead, we acquired standardized rib and spine geometry and fit them to the torso model.

With that said, there is considerable variation among patients with regard to heart shape and even location. Some hearts are long and relatively narrow while others sit higher and are larger in a transverse slice. The variation you have spotted between the textbook and the Utah torso is, I believe, well within that normal range of variation.

Finally, gating to the R wave does not ensure systole in the images of the heart for several reasons. The first reason is that electrical and mechanical systole are not aligned in time. Each cell of the heart experiences a delay between electrical and mechanical excitation (up to 200 ms in fact). The result is that the R wave occurs during end diastole of the mechanical cycle, i.e., well before mechanical systole. Even more important, using the R wave to gate the image acquisition does not mean that all images have to be captured at the time of the R wave peak; rather the peak of the R wave provides a common reference so that acquisitions from different beats can capture the same phase of the heart cycle. The actual acquisition moment can be offset from the time of the R wave using a simple delay, i.e., each acquisition can occur with the same delay from that peak of the R wave.

I hope that, with this information, you can see that the Utah torso geometry can, indeed, be trusted to reasonably representthe geometry of an adult human torso. Just as with the visible human data, this is only one specific case and there are simply not enough data available to begin to create a true atlas that specifies the ranges of normal anatomy of the entire torso. There are atlases like this of the brain but I don't know of any other organ system that has received enough attention to begin to quantify anatomical variation.

 

Network Files 


We use XML-based .srn (SCIRun Network) files. We strongly suggest you convert your .net files to the new .srn format. If you need any more information, please read the module renaming section under "User Documentation / Modules". 

How do I use relative pathname support in SCIRun 4 network files?

The relative path support in the SCIRun network fields assumes the following: The SCIRun network files are located at a fixed relative location from the data. It was designed so you can create a repository in your home directory with data files and networks in the same relative positions that can be easily copied to another directory (another home directory for instance).

You can activate it in your home directory in a file called: .scirunrc

Edit the line:

SCIRUN_NET_RELATIVE_FILENAMES = true

When this variable is set all filenames are exported in a relative fashion. Hence, everyone that wants to export to the repository should have this variable set in the .scirunrc filename. Users who only check out files do not need to edit this variable. SCIRun by default reads both files with absolute paths and with relative paths.

To convert files, set the variable in the .scirunrc file. Then load up each network and save the files. This will export all the files in a relative format. Afterwards, check in the files and everything should work.


CMake


What is a generic CMake command line for building SCIRun 4?

The SCIRun directory (which contains the src subdirectory), has a bin directory. In the bin directory, run this command:

cmake ../src

Some other regularly used CMake variables are:

CMAKE_BUILD_TYPE=Debug (or "Release") BUILD_TESTING=ON (or OFF)


FAQ


Q: What is required to run SCIRun 4?

A: You can find system requirements for building and running SCIRun under the “Specifications” tab.

 

Q: Is there a way to automatically quit SCIRun after running a script to completion using the command line? 

An example using bash in linux would be:

scirun -e test.srn

This would load and execute the SCIRun script test.srn, but I would like to quit/exit it after running.

All you need to do is to change the flag to '-E', so your script would be

scirun -E test.srn


Q: I am using ShowFieldGlyphs to visualize tensor data. Colormap Lookup and Conversion to RGB are two of the Tensor coloring options. With scalar data, understanding the colormap is intuitive. However, with tensors I am unable to understand how the colormap is generated (for both Colormap Lookup and Conversion to RGB options). Is there a mathematical operation performed to convert tensor to scalar?

A: The tensor's principle eigenvector magnitude is used to index to the colormap. The principle eigenvector's x, y, z components are used to generate RGB colors.


Q: How do I take advantage of this built-in Python interpreter?

A: Python scripting support is available in SCIRun 5.


Q: I would like to look at the SCIRun field file (.fld) datasets using my own visual data analysis software. Is there a description of the .fld format?

A: Unfortunately, the SCIRun field file (.fld) format is not well documented. Generally, a SCIRun field file is made up of a small set of tags constituting a header, used to identify the file as a SCIRun field, distinguish between binary and text files, optionally establish endian type etc. The remaining entries are specific to SCIRun's internal data types, identifying mesh types, possible data type contained in the mesh, data location if applicable and other data type-specific information.


Q: There are many files like the SCIRun field file (.fld) in sample datasets (for example, in cyl3). How can I create a .fld file for my own geometry?

A: As you know the SCIRun field file (.fld) is SCIRun's native format. Unfortunately I don't know of any other program that can produce a .fld. My suggestion would be to read in you mesh using the "ReadField" module. There is a drop down menu that allows you to select several different format types. The format will be converted into the "field" format that SCIRun uses. You can then write it out as a .fld with the "WriteField" module.
 


Q: How do you place an electrode so that it is just in contact with the surface of the torso?

A: This is very much possible, but it is a bit tricky. The idea is that you create a defibrillator source that intersects the torso surface. If you have a paddle geometry (a cube will do to start), you situated it with the EditMeshBoundingBox model so that it intersects the torso (better to be deep than shallow). You then use the ClipFieldByMesh module to just get the intersection of the torso and the paddle. Use GetFieldBoundary to get the boundary of the torso. Find the distance map to the torso boundary in the intersect volume (GetDistanceToField) then clip that field by the distance that you want (2-5 mm) using ClipVolumeByIsovalue. This will be one of your sources in the model. It is not really on the surface but embedded a little beneatch it. This method hasn't been as thoroughly vetted, but it should serve as a starting point.


Q: InterfaceWithMatlab fails on Windows because libeng could not be opened. How do I fix this?

A: This problem has shown up on Windows with recent Matlab releases, and this solution has been tested on Windows 7 64-bit with Matlab R2012b 64-bit. Add the directory containing libeng.dll (should be similar to c:\Program Files\MATLAB\R2012b\bin\win64) to the system PATH.


Q: How do I save 3D grid data to a NRRD file that I can use in SCIRun?

A:The easiest way to create a Teem NRRD is to make two different files. The first is a raw data file (usually .raw), and the second is a NRRD header (.nhdr). There are many details and potential variations in the NRRD file format, but the trick is to be consistent between the header and the data. Provided is a simple example that will work in most cases.

The first step is to write out the data in binary format from Matlab. For simplicity's sake, you will want the data arranged so that the values at each point are listed each point (if there are more than one values per location as with vectors), increasing along the positive x direction, then y direction, then z direction.

For vectors, the values need to be order x, y, z and for tensors the values must be ordered xx, xy, xz, yy, yz, zz of a symmetric tensor matrix. Arrange your data into a 4D matrix in Matlab as you would want it to be in SCIRun (values, x-axis, y-axis,z-axis). Then you write out this data using the fwrite function. This will create a binary file which SCIRun will read in with the help of the header.

Some example code:

A=reshape(data,d1,d2,d3,d4); % reshape the data to 4D matrix of size d1, d2, d3, d4
fid=fopen('data.raw','w','b');
fwrite(fid,A,'float');
fclose(fid);


If you are working with scalar data, d1=1, with vector data, d1=3, and with tensor data, d1=6. For all, d2, d3, and d4 are the number of voxels in the x, y, and z direction respectively.
Note: if you are using scalar data you may reduce the data to a 3D matrix, but you will need to make the corresponding changes to the header file, which will not be discussed here.

The second step of creating a NRRD header can be done using a text editor. You should create a nhdr file (named data.nhdr as an example) as follows:

NRRD0004
type: float
dimension: 4
sizes: d1 d2 d3 d4
encoding: raw
endian: big
datafile: data.raw
space dimension: 3
space origin: (0,0,0)
space directions: none (spacing x,0,0) (0,spacing y,0) (0,0,spacing z)


The origin in this case is the minimum point, and the voxel size is encoded in the space directions (spacing=voxel size).

Notice that the data type in the header matches the type of data in the fwrite function (float) and the format (endian: big) in the header matches the format in the fopen function ('b'). For more information about the NRRD header and file format, see the Teem NRRD file format documentation page.

Once these two files have been created in the same directory, you can use the ReadField module with the NrrdFile (*.nhdr, *.nrrd) option or the ReadNrrd module to read it into SCIRun. If the data volume is oriented strangely or flipped when loaded into SCIRun, usually because of inconsistent coordinate systems, you can rearrange the data in Matlab or change the header file by rearranging the space directions and the size dimension order and flip the axes by making them negative (you may also need to change the origin with flipped axes). The trick here is to make the changes consistent across all the header information.

Teem also offers the command-line unu tool to create and manipulate NRRD files. Finally, questions about the Teem library can be addressed to the teem-users mailing list.

Q: Will SCIRun 4 run on OS X 10.8 (Mountain Lion) and newer versions of OS X?

Testing SCIRun 4 on OS X 10.8 and 10.9 has shown that there is a problem using the ViewScene module on systems with some AMD/ATI graphics cards where the screen will become garbled. The NVIDIA cards we have tested have not shown this problem. AMD FirePro D500 shipped with Mac Pros running OS X Sierra (10.12) and El Capitan (10.11) also appear to be safe to use with XQuartz 2.7.11. This information can also be found under the Specifications and Mac OS X tabs.


Q: Will SCIRun 4 work with the default graphics drivers on Ubuntu 12.10 and newer?

Testing SCIRun 4 on newer versions of Ubuntu (later than 12.04 LTS) has shown that the default graphics drivers are not compatible, i.e. SCIRun cannot run. We test with and recommend NVIDIA cards and drivers, which are known to work.


Q: I need to rotate objects in the SCIRun 4 ViewScene. How do I enable the middle mouse button on Mac OS X?

Enable the 'Emulate three button mouse' option in the X11 App Preferences window. X11 App Preferences can be opened from the X11 menu.


x11 menu  x11 preferences




Support

All of our mailing lists are public and searchable through Google. For best search results, include the "scirun-users" or "sympa" in your search terms.

Alternatively, you can browse the scirun-users mailing list archive.

SCIRun Mailing Lists
Reporting Bugs and Feature Requests

Joining the SCIRun Users Mailing List

  1. Compose an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with the following in the body of message: subscribe scirun-users
  2. Nothing needed in the Subject line. Just send.
  3. You will receive a response from the list manager requesting confirmation. Just send back a reply message to confirm your subscription (no added text needed).
  4. Finally, you will receive a welcome message confirming that you have been added to the mailing list.

Unsubscribing

  1. Compose an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with the following in the body of message: unsubscribe scirun-users
  2. Nothing needed in the Subject line. Just send.
  3. You will receive a response from the list manager notifying you that the command has succeeded and you have been removed from the list.

The same procedure should be used to subscribe to the scirun-develop mailing list.



Please send bugs and feature requests to This email address is being protected from spambots. You need JavaScript enabled to view it.
You must be a member of the scirun-develop mailing list to send bugs. Please follow the SCIRun Mailing Lists instructions to subscribe:
  1. Compose an email to This email address is being protected from spambots. You need JavaScript enabled to view it. with the following in the body of message: subscribe scirun-develop
  2. Nothing needed in the Subject line. Just send.
  3. You will receive a response from the list manager requesting confirmation. Just send back a reply message to confirm your subscription (no added text needed).
  4. Finally, you will receive a welcome message confirming that you have been added to the mailing list.

Developers with SCI or SCI collaborator accounts can report bugs and request features through the tracker on github.




For general questions about SCIRun, please contact the CIBC Technical Management


SCIRun Data

The SCIRun Datasets can be downloaded from the SCIRun download site. The compressed datasets are 390 MB in size. Individual datasets are also available from the NCRR Dataset Archive.

Data can also be checked out using from the GForge Subversion repository using the URL https://gforge.sci.utah.edu/svn/CIBCData/SCIRunData through developer access or anonymously, or browsed using the web interface.