Intro
Most of our image processing is based around NRRD files as an intermediate image format. CMTK, ImageJ/Fiji and R can read/write them. But commercial Amira cannot by default. ZIB Amira can.
I have written a small plugin for Amira that lets it read and write nrrd files.
Install
Requirements
To read nrrd files in Amira, you need two things
I have prepared binary versions which can be copied into place (see below) for certain OS X / Amira versions.
If binary installation does not work, both have to be compiled from source and compiled versions will only work with the (major?) version of Amira e.g. 5.3.1-5.3.3 prob fine, but 5.2 to 5.3 no good. Since Amira on mac is 32 bit only at they moment, they must be compiled as 32 bit or be fat binaries with both 32 and 64 bit. On MacOSX 10.6+ 64 bit is the default so you have to take steps to compile 32 bit. By default compilation on OSX10.6 produces binaries that will not work on OSX10.5.
Binary install from JData
Go to /Volumes/JData/JPeople/Common/Software/Scientific/Amira
For OSX10.5 at the moment
- Install Amira 5.2.2 (Amira522-MacX.dmg)
- Install hxNrrdIO-522-OSX10.5
- Copy
/Volumes/JData/JPeople/Common/Software/Scientific/Amira/hxNrrdIO-522-OSX10.5/lib/arch-MacX-Optimize/*
to /Applications/Amira-5.2.2/lib/arch-MacX-Optimize
- Copy
/Volumes/JData/JPeople/Common/Software/Scientific/Amira/hxNrrdIO-522-OSX10.5/share/resources/hxNrrdIO.rc
to /Applications/Amira-5.2.2/share/resources
- NB this includes the TEEM/NRRD libraries
For OSX10.6 at the moment
- Install Amira 5.3.3 (Amira533-MacX.dmg)
- Install hxNrrdIO-533-OSX10.6
- Copy
/Volumes/JData/JPeople/Common/Software/Scientific/Amira/hxNrrdIO-533-OSX10.6/lib/arch-MacX-Optimize/*
to /Applications/Amira-5.3.3/lib/arch-MacX-Optimize
- Copy
/Volumes/JData/JPeople/Common/Software/Scientific/Amira/hxNrrdIO-533-OSX10.6/share/resources/hxNrrdIO.rc
to /Applications/Amira-5.3.3/share/resources
- Install /Volumes/JData/JPeople/Common/Software/Scientific/teem/libteem-osx10.6.tgz
- Mount JData on your machine via Finder
- Start a Terminal session
sudo tar -xz -C / -f /Volumes/JData/JPeople/Common/Software/Scientific/teem/libteem-osx10.6.tgz
- sudo is required to expand the libteem software into /usr/local which is a protected directory.
- You will need to give it your password
Compile
- See https://github.com/jefferis/hxNrrdIO/blob/master/INSTALL for more on both teem and hxNrrdIO compilation
- teem needs cmake
- ccmake is the TUI for choosing cmake options
- Should choose the Release option
- Need to specify
i386
as the architecture - If you want a fat binary with i386 AND x86_64 teem then I have only figured out how to do this with lipo
- Build 32 and 64 versions in separate build directories e.g.
build32
andbuild64
- sudo make install either one of them
- This will give you a single arch dylin in /usr/local and set up the correct versioned symlinks
- lipo build32/bin/libteem.1.11.0.dylib build64/bin/libteem.1.11.0.dylib -output libteem.1.11.0.dylib -create
- sudo cp libteem.1.11.0.dylib /usr/local/lib
- ie overwriting the versioned library
- hxNrrdIO needs Amira developer version + Xcode.
hxNrrdIO works with Amira6, but Xcode4.6.3 is needed (you can find it in /Volumes/JData5/JPeople/Common/Software/Scientific/Xcode_old versions). You can keep the latest Xcode version and simply drag and drop the old version in the Application folder, which will be called Xcode 2. Then edit your Amira Makefile (the GNUmakefile in hxNrrdIO folder) to point to the 4.6.3 compiler/linker: CC = /Applications/Xcode\ 2.app/Contents/Developer/usr/bin/gcc CXX = /Applications/Xcode\ 2.app/Contents/Developer/usr/bin/g++