Extraction of Phase Encoding in DICOM Image

Download Complete Package in Zip File


MATLAB script and Linux binary are released for extraction of phase encoding direction (PED) in DICOM file. Current version works for Siemens product, CMRR SMS MB and MGH SMS MB EPI sequences (BOLD, DWI, and SE-EPI). Please contact Dr. Moon, moonc@upmc.edu for error report or question.

I. MATLAB

    1. Download “MATLAB.zip” & “PhantomData.zip” files
        1. MATLAB.zip” – m codes
        2. PhantomData.zip” – Examples of EPI DICOM images acquired from Prisma 3, VE11E
    2. Unzip in your local hard disk
    3. Run MATLAB
    4. Open checkped.m in MATLAB folder, and edit study folder, series folders, and format of DICOM file name
        • % add path where m codes are
        • addpath('/…/PhaseEncodingDirection/MATLAB');
        • % set your folder path where MRI DICOM series folders are
        • pfolder = '…/PhaseEncodingDirection/PhantomData';
        • % folders’ name of MRI series in a study
        • fnamelist = {...
            • 'BOLD_EPI_PE_AP_0003'...
            • 'BOLD_EPI_PE_LR_0012'...
            • 'BOLD_EPI_PE_PA_0005'...
            • 'BOLD_EPI_PE_RL_0007'...
            • 'DTI_PHASE_ENCODING_AP_0008'...
            • 'DTI_PHASE_ENCODING_LR_0013'...
            • 'DTI_PHASE_ENCODING_PA_0009'...
            • 'DTI_PHASE_ENCODING_RL_0010'...
        • };
        • nlist = length(fnamelist);

        • % Format for DICOM file name
        • %dicompat = 'MR.*'; % Gyrus or XNAT
        • dicompat = '*.IMA'; % Exported to local hard disk
    5. Run checkped.m under MATLAB


II. Linux Binary

The program reads json file that is generated by dcm2niix program to extract PED in DICOM file. The program is tested on Ubuntu and CentOS.

        • Description:Ubuntu 16.04.7 LTS
          Release:16.04
          Codename:xenial

        • Description:Ubuntu 18.04.5 LTS
          Release:18.04
          Codename:bionic

        • centos-release-8.2-2.2004.0.1.el8.x86_64

* Requirement software:
        • dcm2niix; supported version v1.0.20170821, v1.0.20190902, v1.0.20200427, v1.0.20201102

* The path of dcm2niix should be visible to a user, for example, /usr/local/bin/dcm2niix

    1. Download the binary file, checkped for your OS

    2. Type checkped in command line for help
        • This program extract Phase Encoding Direction from DICOM file!
        • Usage : checkped -i dicom.ima
            • Requirement: dcm2niix version v1.0.20170821 v1.0.20190902 v1.0.20200427 v1.0.20201102
            • Chan Hong Moon @MRRC 01/20/2021

    3. Type checkped -i dicomfile
      An example of result,
      dcm2niix version: v1.0.20201102
      PhaseEncodDirection: R > L