Coder Social home page Coder Social logo

ge_to_ismrmrd's Introduction

Getting started with the Orchestra to ISMRMRD converter library

Orchestra conversion tools

To build and install the tools to convert GE raw files into ISMRMRD files:

  1. Define the SDKTOP environment variable:

    export SDKTOP=/fmrif/projects/ESE/Orchestra
  2. Define the ISMRMRD_HOME AND GE_TOOLS_HOME variables. These specify installation location(s), e.g.

    export ISMRMRD_HOME=<prefix>/ismrmrd
    export GE_TOOLS_HOME=<prefix>/ge-tools
  3. Obtain the ISMRMRD source code:

    git clone https://github.com/ismrmrd/ismrmrd
  4. Pre-define the location of HDF5 in order to use Orchestra's static HDF5 library:

    export HDF5_ROOT=$SDKTOP/include/recon/3p/Linux/hdf5-1.8.12_dev_linux64

    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.

  5. Configure, compile, and install ISMRMRD:

    cd ismrmrd/
    mkdir build
    cd build/
    cmake -D CMAKE_INSTALL_PREFIX=$ISMRMRD_HOME -D HDF5_USE_STATIC_LIBRARIES=yes -D CMAKE_EXE_LINKER_FLAGS="-lpthread -lz -ldl" ..
    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 Boost_INCLUDE_DIR=$SDKTOP/include/recon/3p/Linux/boost_1_55_0_dev_linux64/include/ -D CMAKE_INSTALL_PREFIX=$ISMRMRD_HOME -D HDF5_USE_STATIC_LIBRARIES=yes -D CMAKE_EXE_LINKER_FLAGS="-lpthread -lz -ldl" ..

    It may also be necessary to force the usage of older ABIs standards for C++. To accomplish this, a switch along the lines of:

    -D_GLIBCXX_USE_CXX11_ABI=0

    will have to be added to the "CMAKE_CXX_FLAGS" option in the project's CMakeLists.txt file.

  6. If using the Gadgetron for reconstruction, obtain and configure code similarly, to use the HDF5 supplied with Orchestra:

    git clone https://github.com/gadgetron/gadgetron.git
    cd gadgetron/
    mkdir build
    cd build/
    cmake   -D CMAKE_INSTALL_PREFIX=$GADGETRON_HOME   -D HDF5_USE_STATIC_LIBRARIES=yes   -D CMAKE_EXE_LINKER_FLAGS="-lpthread -lz -ldl" ..
    make install
    cd ../

    On some systems, with multiple versions of gcc, to force Gadgetron to compile with the appropriate version of gcc (since at least version 6 is required), you can be explicit to cmake about the compiler it should use with a command like:

    cmake   -D CMAKE_C_COMPILER=/usr/bin/gcc-6   -D CMAKE_CXX_COMPILER=/usr/bin/g++-6   -D CMAKE_INSTALL_PREFIX=$GADGETRON_HOME   -D HDF5_USE_STATIC_LIBRARIES=yes   -D CMAKE_EXE_LINKER_FLAGS="-lpthread -lz -ldl" ..
  7. Obtain the GE converter source code:

    git clone https://github.com/ismrmrd/ge_to_ismrmrd.git
  8. 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 ../
  9. 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.

  10. A typical command line to convert the supplied P-file using this library is:

    pfile2ismrmrd -v -l libp2i-generic.so -p GenericConverter -x $GE_TOOLS_HOME/share/ge-tools/config/default.xsl P21504_FSE.7
  11. If customized conversion libraries are desired, the corresponding command will be:

    pfile2ismrmrd -v -l libp2i-NIH.so -p NIH2dfastConverter -x $GE_TOOLS_HOME/share/ge-tools/config/default.xsl P21504_FSE.7

    The 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.

  12. Similarly, a typical command line to convert an example ScanArchive file using this library is:

    pfile2ismrmrd -v -l libp2i-generic.so -p GenericConverter -x $GE_TOOLS_HOME/share/ge-tools/config/default.xsl ScanArchive_FSE.h5

    Sample raw data files are now in the 'sampleData' directory.

ge_to_ismrmrd's People

Contributors

roopchansinghv avatar twitzelbos avatar jad11nih avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.