hopkinslogo_crop

Jonathan Farrell, BS

Ph.D. Candidate

Johns Hopkins University School of Medicine              

 

 

USEFUL LINKS: [home] [curriculum vitae]

 

           

LINKS TO SOFTWARE ON THIS PAGE:             CATNAP                                                           Code for image coregistration and DTI data processing.

                                                                                          PARtoNRRD                                                    Code to make NRRD headers for Philips DTI data using the PAR file.

                                                                                          DTI_gradient_table_creator (updated)       Code to compute the gradient table for Philips DTI data.

 

 

CATNAP

image001

CATNAP (Coregistration, Adjustment, and Tensor-solving – a Nicely Automated Program) is an end to end data processing pipeline for Philips PAR/REC Magnetic Resonance data files. CATNAP performs motion correction for both diffusion and structural images using FSL FLIRT, adjusts the diffusion gradient directions for scanner settings (i.e., slice angulation, slice orientation, etc.) and motion correction (i.e., the rotational component of the applied transformation), and computes tensor and derived quantities (FA, MD, colormaps, eigenvalues etc) . The results are readily compatible with DTIStudio, FSL, and other tensor analysis packages.

 

 

 

 

 

 

Status:                                                            Public Release

Platform:                                                        Matlab

Contact Person:                                             Bennett Landman

Download & Documentation:                       http://iacl.ece.jhu.edu/~bennett/catnap/catnap.html

 

 

PARtoNRRD

 

Untitled-1

 

The PARtoNRRD project aims to provide a tool to generate NRRD headers (.nhrd files) for Philips DTI data. This is done by:

 

§     Extracting parameters from the PAR file

 

§     Computing the DTI gradient table (.grad file) with DTI_gradient_table_creator.m (for Kirby center scanners) or

            DTI_gradient_table_creator_Philips_RelX.m (for other Philips scanners).

 

The .nhdr files are in ASCII text format and contain all information necessary to completely describe a DTI dataset (such as resolution, gradient directions, b-values, measurement frame). 

For more documentation about the NRRD format please see [NAMIC Wiki:DTI:Nrrd_format].  The .nhdr files are very useful to read DTI data into Slicer.

The PARtoNRRD code also outputs the .grad file (a text file of gradient directions) suitable for DTIstudio.

 

I have made 2 forms of the Matlab source code available.  I hope this code is useful, but please remember use it as your own risk. 

I have tested the resulting .grad files on DTIstudio (Windows OS)

I have tested the .nhdr files on Slicer (release 2.7 dev that is capable of skipping DTI volumes) on Windows and Solaris

 

MATLAB CODE:

 

Status:                                                            Public Release.  Downloading and usage constitutes acceptance of this license.

Platform:                                                        Matlab

Contact Person:                                             Jonathan Farrell

Acknowledgements:                                      How to acknowledge / cite

Updated:                                                        9:00 pm EST, November 5, 2006

 

F.M. Kirby Center Philips MRI scanners:     [PARtoNRRD_kirby]

                                                                        Requires DTI_gradient_table_creator.m

 

Other Philips MRI scanners:              [PARtoNRRD_Philips_RelX]

                                                                        Requires DTI_gradient_table_creator_Philips_RelX.m

 

Examples (par files & matlab instructions)  [v4_yes-ovp-high_volume_ordered]

                                                                        [v4_user-defined_slice_ordered]

 

 

NOTE:  Slicer (windows OS) had trouble with memory allocation and produces an error message with large DTI datasets (256 x 256 x 55 slices x 32 volumes).  I had success working with smaller datasets ( ~ less than 55 slices).  This problem was not encountered on the Solaris UNIX system.

 

NOTE:  Philips PAR/REC data can be written out in a volume ordered or slice ordered manner. 

Volume ordered:  slice 1 through slice N of volume 1, then slice 1 through slice N of volume 2 …

Slice ordered:  slice 1 for volume 1 through M, then slice 2 for volume 1 through M …

The PARtoNRRD code can now automatically detect both ordering formats.

 

NOTE:  If you performed a DTI scan with the user-defined gradient table, then you need to provide my code with a text file that has your directions listed (NOT including the b=0 volume).  Please enter them as they were on the scanner in the following format. (see examples)

 

 0:  0.9093, 0.2163, 0.3555

 1:  0.1694, -0.9669, -0.1907

 2:  0.4335, -0.4945, 0.7534

 3:  -0.4816, 0.8343, 0.2684

 4:  0.7392, 0.6569, -0.1484

 5:  -0.0374, 0.8857, -0.4628

 

OR

 

 0.9093  0.2163  0.3555

 0.1694 -0.9669 -0.1907

 0.4335 -0.4945  0.7534

-0.4816  0.8343  0.2684

 0.7392  0.6569 -0.1484

-0.0374  0.8857 -0.4628

 

 

 

DTI_gradient_table_creator

 

INTRODUCTION:

 

DTI_gradient_table_creator computes the correct gradient table (i.e., the list of vectors that describe the diffusion weighting directions to use for analysis) for DTI acquisitions on Philips MRI scanners.  The code computes the gradient table based on minimal user input, and provides a quick and easy method to determine the correct gradient table necessary to calculate diffusion tensors (i.e., for FA, color coded principal eigenvector, fiber tracking etc.).  The specifics of the gradient table on the Philips MRI scanner are determined by:

 

§     The 3 coordinate frames in which directions are defined on the MR scanner (XYZ, MPS, LPS)

§     The rules for how several imaging options (slice orientation, slice angulation, phase encoding direction, etc.) impact the gradient directions.  

§     The scanner software release and user supplied information about the DTI scan

§     Any coregistration (motion correction) performed with AIR or FSL FLIRT

 

DTI_gradient_table_creator outputs ASCII text gradient tables compatible with CATNAP, DTIstudio, dtiproc and other DTI analysis suites.   I have made 2 forms of the code available, Matlab source code (preferred) and an online JAVA applet (for researchers who do not have access to Matlab).  I hope this code is useful, but please remember use it as your own risk.

 

The development, testing and maintenance of the code on this webpage required (and continues to require) significant manpower and resources.  Therefore, we ask that if the code provided on this webpage (the Matlab functions or JAVA applet) is useful for your project, please acknowledge the contributions of the authors as follows (How to acknowledge / cite ).

 

- Jonathan Farrell

 

SPECIAL NOTES: DTI gradient directions listed in the PAR file

 

§     If your DTI data was acquired on a Philips MR Scanner with new software (release 1.5, 1.7, 2.0 or 2.1), the PAR file version may be V4.1.  You can verify this by looking at the top right hand corner of the file for the tag:  Research image export tool V4.1.  The other known versions are V3 or V4.

 

§     The V4.1 par files list the diffusion weighting directions.  HOWEVER, these directions are not in pixel space.  Specifically, in the case of gradient overplus = YES tables, the directions need to be rotated and corrected for slice angulation.  This is automatically done with DTI_gradient_table_creator.

 

§      DTI_gradient_table_creator DOES NOT read in the directions from the PAR file because this information is not available for all PAR files (V3 or V4).  Instead, it uses the directions documented in the Philips source code.

 

SPECIAL NOTES: Change to Philips Yes Overplus High Gradient Table

 

§     Philips has changed one diffusion weighting vector in release 2.5.  This was to correct a duplicate direction in the gradient table. 

 

         Before Release 2.5                            Release 2.5

         {1.0000,-0.6682, 0.7440},  <--->   {-1.0000,-1.0000, 0.0111}

 

My code provides normalized gradient directions, but you can see the change in direction 22

 

         22: 0.707, -0.472, 0.526                            22: -0.707, -0.707, 0.008

 

 

MATLAB CODE:

 

Status:                                                            Public Release.  Downloading and usage constitutes acceptance of this license.

Platform:                                                        Matlab

Contact Person:                                             Jonathan Farrell

Acknowledgements:                                      How to acknowledge / cite

Updated:                                                        December 29, 2007

 

F.M. Kirby Center Philips MRI scanners:     [DTI_gradient_table_creator]

Other Philips MRI scanners:              [DTI_gradient_table_creator_Philips_RelX]

 

NOTE:  It is very important to use the version appropriate for your imaging site

 

§     If your DTI data was acquired on the 1.5T or 3T Philips MR scanners at the F.M. Kirby research center, then my code accommodates the known software upgrades on both scanners. 

 

§     The version for other Philips MRI scanners accommodates the standard Phillips low (6), medium (15) and high (32) DTI gradient tables as well as the user defined gradient tables entered on the scanner.  This is typically available on Philips Intera and Philips Achieva MRI scanners.

 

§     An example of how to call each Matlab function is given at the bottom of this page. 

 

 

ONLINE JAVA APPLETS:

 

Status:                                                            Public Release.  Downloading and usage constitutes acceptance of this license.

Platform:                                                        JAVA applet  

Contact Person:                                             Jonathan Farrell

Acknowledgements:                                      How to acknowledge / cite

Updated:                                                        November 13, 2007

 

F.M. Kirby Center Philips MRI scanners:     ** Please use Matlab code available on godzilla server

 

Other Philips MRI scanners:              [DTI_gradient_table_creator_Philips_RelX_applet]

 

NOTE:  These JAVA applets are provided especially for researchers who do not have access to Matlab. The applet accommodates the standard Phillips low (6), medium (15) and high (32) DTI gradient tables.  The applets DO NOT support the user-defined gradient table option, nor do they correct for the rotational component of motion correction (image registration), so please use the Matlab code if you want to do this (recommended).

 

 

EXAMPLE INPUT FOR MATLAB CODE:

 

Code for Kirby Center:  >> denotes Matlab prompt

 

>> A.par_file = '/g2/jfarrell/data/test1.par';

>> A.didREG = 'n';

>> A.writeGRAD = 'y';

>> A.grad_choice = 'yes-ovp-high';

>> A.scanner = '3';

>> A.fat_shift = 'P';

>> A

 

A =

 

       par_file: '/g2/jfarrell/data/test1.par'

         didREG: 'n'

      writeGRAD: 'y'

    grad_choice: 'yes-ovp-high'

        scanner: '3'

      fat_shift: 'P'

 

>> [final_table] = DTI_gradient_table_creator(A)

 

 

Code for other Philips sites:  >> denotes Matlab prompt

 

>> A.par_file = '/g2/jfarrell/data/test1.par';

>> A.didREG = 'n';

>> A.writeGRAD = 'y';

>> A.grad_choice = 'yes-ovp-high';

>> A.release = 'Rel_10.x';

>> A.fat_shift = 'P';

>> A

 

A =

 

       par_file: '/g2/jfarrell/data/test1.par'

         didREG: 'n'

      writeGRAD: 'y'

    grad_choice: 'yes-ovp-high'

        release: 'Rel_10.x'

      fat_shift: 'P'

 

>> [final_table] = DTI_gradient_table_creator_Philips_RelX(A)

 

 

 

ACKNOWLEDGEMENTS:

                                  

The development, testing and maintenance of the code on this webpage required (and continues to require) significant manpower and resources.  Therefore, we ask that if the code provided on this webpage (CATNAP, the Matlab functions or JAVA applet) is useful for your project, please acknowledge the contributions of the authors as follows:

 

In Text Acknowledgement:

 

The DTI_gradient_table_creator / PARtoNRRD software was kindly provided by Jonathan A.D. Farrell (Johns Hopkins University, Baltimore, Maryland USA). The development of this software was supported by NIH/NCRR grant RR15241 to the Kennedy Krieger Institute, RO1AG20012 and U24 RR021382-02 (Morphometry group of the Biomedical Informatics Research Network, BIRN).

 

Reference Citation for DTI_gradient_table_creator:

 

Effects of SNR on the Accuracy and Reproducibility of DTI-derived Fractional Anisotropy, Mean Diffusivity, and Principal Eigenvector Measurements at 1.5T.

J.A.D. Farrell, B.A. Landman, C.K. Jones, S.A. Smith, J.L. Prince, P.C.M. van Zijl, S. Mori

Journal of Magnetic Resonance Imaging, 26:756-767, 2007

 

Reference Citation for CATNAP:

 

Effects of Diffusion Weighting Schemes on the Reproducibility of DTI-derived Fractional Anisotropy, Mean Diffusivity, and Principal Eigenvector Measurements at 1.5T.

B.A. Landman, J.A.D. Farrell, C.K. Jones, S.A. Smith, J.L. Prince, S. Mori,

NeuroImage, Volume 36:1123-1138, 2007

 

Last Updated: November 13, 2007