Personal tools
  • Help

brains:MainPage

From NITRC Wiki

Jump to: navigation, search

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

  1. Change directories to the location where you ran the BRAINS svn checkout
  2. Checkout the regression testing suite
  3. Add tests for recently developed regression testing suite

The results from the testing suite are posted on the BRAINS Dart Dashboard

To Do

  1. Strip Additional packages that are not needed: Python, itcl, iwidgets
  2. Test build under windows
  3. Test build under RedHat/Fedora
  4. Test build under Suse
  5. Update to allow regression tests to run
  6. 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
  • 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
  • Brains::itk::ObjectMorphology {inputImage operation structureType radius {outputDataType Image-Type}
  • Brains::itk::GrayscaleMorphology {inputImage operation structureType radius {outputDataType Image-Type}
    • 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
  • Brains::itk::BinaryImageMorphology {inputImage operation structureType closingSize}
  • Brains::itk::IntensityWindowingImage {inputImage minValue maxValue windowMinValue windowMaxValue
  • Brains::itk::LoadImage ImageFileName DataType
  • Brains::itk::MaskImage inputImage inputMask outsideValue
  • Brains::itk::measureVolumeLabelImage inputImage
  • Brains::itk::measureLabelImageStatistics labelMap inputImage
  • Brains::itk::measureImageStatistics inputImage
  • Brains::itk::NotImage inputImage
  • Brains::itk::OrImage inputImage1 inputImage2
  • Brains::itk::RegionOfInterestImage inputImage roi
  • Brains::itk::ResampleImage inputImage transform outputDataType interpolatorType resolutions dimensions origin
  • Brains::itk::ResampleImageWithReferenceImage inputImage transform referenceImage interpolatorType RequestedDataType DefaultPixelValue>
  • Brains::itk::RelabelComponentImage inputImage minimumObjectSize
  • Brains::itk::RescaleImage inputImage outputDataType minValue maxValue
  • Brains::itk::SaveImage inputImage ImageFileName
  • Brains::itk::ShiftScaleImage inputImage shift scale
  • Brains::itk::BinaryThresholdImage inputImage lowerThreshold upperThreshold invertFlag OutputDataType
  • Brains::itk::ThresholdImage inputImage minValue maxValue outsideValue
  • Brains::itk::PerimeterContrastThresholdImage inputImage lowerThreshold upperThreshold insideValue outsideValue
  • Brains::itk::SignedDistanceImage inputImage
  • Brains::itk::ConnectedComponentImage inputImage
  • Brains::itk::ConnectedThresholdImageFilterWithCornerSeeds inputImage lowerThreshold upperThreshold replaceValue
  • Brains::itk::JointCommonMaskEstimationFromSTAPLEFilter MaskFileNameList OutputImageFile
  • Brains::itk::readTransform filename
  • Brains::itk::MedianImageFilter InputImage size
  • Brains::itk::GrayScaleFillHoleImageFilter InputImage fullyConnected
  • Brains::itk::ImageRegion Dimensions Size Index

How to Add a BRAINS Test Procedure

  1. 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
  2. Add the test procedure name to the CMakeLists.txt file in src/iplTclCmd
  3. CMake will generate a wrapper script for testing the procedure
  4. Quick test for testing new test
brains3 -b <Path-To-BRAINS-COMPILE>/<Platform>/DEBUG-build/BRAINS3-build/src/Testing/results/<Test>_wrapper.b2

Autoworkup

Powered by MediaWiki
  • This page was last modified 19:07, 15 January 2010.
  • This page has been accessed 5,560 times.
  •