brains:MainPage
From NITRC Wiki
Contents |
Building BRAINS
- Download the BRAINS software
% svn co https://www.nitrc.org/svn/brains/BRAINS/trunk BRAINS3
- Set your environment
- C compiler - eg. export CC=gcc
- C++ compiler - eg. export CXX=g++
- Architecture - eg. export ARCH=linux
- Valid Flags: SunOS, Linux, Darwin, Windows NT
- Application Binary Interface - eg. export ABI=DEBUG
- Common Modes: DEBUG, FAST
- Linux Only Modes: PROFILE_64, PROFILE, FAST_64, FASTO3_64, DEBUG_64
- Run the compile script
% BRAINS3/BuildScripts/getbuildtest.tcl
This script should get modified to be a TCL script to improve cross platform support. This script only needs to be run the first time. Once a successful compile is performed, updates can be compiled by going to the directory BRAINS-Compile/${ARCH}/${ABI}-build/BRAINS3-build and running the make command.
Platforms
NOTE: The current build scripts has been tested on the following platforms
- Linux:
- Ubuntu - 32 bit - 8.10
- Ubuntu - 64 bit - 7.10
- Ubuntu - 64 bit - 8.10
- Macintosh
- Mac OS X - Intel - 10.5
- Mac OS X - PPC - 10.5 - Note: need to set the following environmental variable
export MACOSX_DEPLOYMENT_TARGET="10.4"
Enabling Regression Testing Suite
- Change directories to the location where you ran the BRAINS svn checkout
- Checkout the regression testing suite
- svn checkout --username developername https://www.nitrc.org/svn/brainstestdata
- Add tests for recently developed regression testing suite
The results from the testing suite are posted on the BRAINS Dart Dashboard
To Do
Strip Additional packages that are not needed: Python, itcl, iwidgets- Test build under windows
- Test build under RedHat/Fedora
- Test build under Suse
Update to allow regression tests to run- Setup machines for nightly testing
- Linux 32 bit
- Linux 64 bit
- Mac - Intel
- Mac - PPC
- Windows
ITK Wrapping Functions
Red=Tested
- Brains::itk::AndImage image1 image2
- AND two integral images together. This is always pairwise unlike brains2 where N images could be specified simultaneously
- Brains::itk::CastImage inputImage outputDataType
- Cast an image between different pixel type representations. The keywords for the datatypes are:
- Unsigned-8bit
- Signed-16bit
- Float-single
- Cast an image between different pixel type representations. The keywords for the datatypes are:
- Brains::itk::ClipImage inputImage clipRegion backgroundValue
- Clip an Image to the area specified by region. This procedure uses the PasteImageFilter.
- Brains::itk::ImageMath inputImage1 inputImage2 operation outputDataType
- Add
- Subtract
- Multiply
- Divide
- Maximum
- Minimum
- Perform the specified morhpology operation on a grayscale image. The radius of the structuring element is specified in mm and converted internally to voxels.
- Operations:
- Erode
- Dilate
- Element:
- Ball
- Box
- Data-Types:
- Unsigned-8bit
- Signed-16bit
- Unsigned-16bit
- Float-single
- Operations:
How to Add a BRAINS Test Procedure
- Create a file with the test in src/regressionmodule/module
- The name of the procedure needs to match the file name
- The procedure should take two inputs
- pathToRegressionDir - Base directory for regression tsting data
- dateString - Time stamp for test
- Two global variables have been defined: MODULE_SUCCESS and MODULE_FAILURE. Your test should return one of these values depending on the status of your test
- Convenience functions have been created for testing purposes
- StartModule - Start module logging
- StopModule - Stop module logging and return module status
- ReportTestStatus - Report if a test passes or fails
- CoreImageTest - test an image for specified parameters
- Add the test procedure name to the CMakeLists.txt file in src/iplTclCmd
- CMake will generate a wrapper script for testing the procedure
- Quick test for testing new test
brains3 -b <Path-To-BRAINS-COMPILE>/<Platform>/DEBUG-build/BRAINS3-build/src/Testing/results/<Test>_wrapper.b2




