Orchestra conversion tools
To manually build and install the tools to convert GE raw files (using Orchestra) into ISMRMRD files:
With Orchestra (currently, version 3.0.3), GE now provides all support libraries to link against, when building against Orchestra's API.
The steps outlined below should allow you to build and install ISMRMRD using Orchestra's Boost and HDF5 libraries, and the GE-to-ISMRMRD converter.
-
Define the
SDKTOPenvironment variable:export SDKTOP=/fmrif/projects/ESE/Orchestra -
Define the
ISMRMRD_HOMEANDGE_TOOLS_HOMEvariables. These specify installation location(s), e.g.export ISMRMRD_HOME=<prefix>/ismrmrd export GE_TOOLS_HOME=<prefix>/ge-tools
-
Obtain the ISMRMRD source code:
git clone https://github.com/ismrmrd/ismrmrd
-
Pre-define the location of HDF5 in order to use Orchestra's static HDF5 library:
export HDF5_ROOT=$SDKTOP/3p
Any other version of HDF5 on the system can cause conflicts as cmake will find all versions, and will cause issues or conflicts with the build process. For these instructions to work, only the HDF5 supplied with Orchestra should be on the system.
-
Configure, compile, and install ISMRMRD:
cd ismrmrd/ mkdir build cd build/ cmake -D build4GE=ON -D CMAKE_INSTALL_PREFIX=$ISMRMRD_HOME .. make install cd ../
If the situation is encountered where the system compilers and Boost version are "too far ahead" of how Orchestra's support libraries (which include Boost) were compiled, then it may be necessary to have the ISMRMRD build explicitly refer to Orchestra's Boost libraries, with a command like:
cmake -D CMAKE_INSTALL_PREFIX=$ISMRMRD_HOME -D build4GE=TRUE -D Boost_NO_BOOST_CMAKE=TRUE -D Boost_NO_SYSTEM_PATHS=TRUE ..A good discussion of pointing cmake to alternate Boost installations can be found at this link.
-
Obtain the GE converter source code:
git clone https://github.com/ismrmrd/ge_to_ismrmrd.git
-
Configure, compile and install the converter:
cd ge_to_ismrmrd/ mkdir build cd build/ cmake -D CMAKE_INSTALL_PREFIX=$GE_TOOLS_HOME .. make install cd ../
Make sure $ISMRMRD_HOME/bin and $GE_TOOLS_HOME/bin are added to your environment's PATH variable,
and that $ISMRMRD_HOME/lib and $GE_TOOLS_HOME/lib are added to your environment's LD_LIBRARY_PATH
variable, to be able to use the libraries and binaries supplied with these tools.
-
A typical command line to convert the supplied P-file using this library is:
ge2ismrmrd -v P21504_FSE.7
-
If customized conversion libraries and/or stylesheets are desired, the corresponding command will be:
ge2ismrmrd -v -p NIH2dfastConverter -x $GE_TOOLS_HOME/share/ge-tools/config/default.xsl P21504_FSE.7The source code that enables this example is included with these tools. This example is a straightforward copy of the GenericConverter, but it shows how these classes can be inherited from and implemented.
-
Similarly, a typical command line to convert an example ScanArchive file using this library is:
ge2ismrmrd -v -p GenericConverter -x $GE_TOOLS_HOME/share/ge-tools/config/default.xsl ScanArchive_FSE.h5Sample raw data files are now in the 'sampleData' directory.
-
Copy the orchestra-sdk-[version].tar.gz into your local ge_to_ismrmrd respository
-
Build a Docker image using:
docker build --file Dockerfile --tag ge_to_ismrmrd . -
An example of using ge_to_ismrmrd Docker image to convert GE raw files:
docker run -it --rm -v `pwd`/src/config:/config -v `pwd`/sampleData:/sampleData ge_to_ismrmrd ge2ismrmrd -v -p GenericConverter -x /config/default.xsl /sampleData/ScanArchive_FSE.h5 -o /sampleData/ismrmrd_FSE.h5