Compiling dcm2niix on CentOS 7


Prerequisites

  1. GNU 6.5
  2. > CMAKE 3.9.6

What is dcm2niix?

dcm2niix is designed to convert neuroimaging data from the DICOM format to the NIfTI format. This web page hosts the developmental source code – a compiled version for Linux, MacOS, and Windows of the most recent stable release is included with MRIcroGL. A full manual for this software is available in the form of a NITRC wiki.

Compilation

% git clone https://github.com/rordenlab/dcm2niix.git
% cd dcm2niix
% cmake -DUSE_OPENJPEG=ON -DCMAKE_CXX_FLAGS=-g -DUSE_STATIC_RUNTIME:BOOL=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/dcm2niix . && make
% make install

If you turn USE_STATIC_RUNTIME:BOOL=ON, Some Centos/Redhat may report “/usr/bin/ld: cannot find -lstdc++”. This can be resolved by installing static versions of libstdc++: yum install libstdc++-static.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.