Ratland:Start Project

From wiki
Jump to navigationJump to search

Data Transfer and Conversion

Download data from PACS to NIRAL server

Scans are performed at the Biomedical Research Imaging Center (BRIC) bric.unc.edu

There is a brief list of directions here: /biomed-resimg/projects5/DICOM_incoming/processSteps.txt

  1. Connect to: http://sapacs.bric.unc.edu
    • Username: stynerlab
    • Password: stynerlab1 (alternates with stynerlab2)
  2. Browse/Display all or Search
  3. Select desired Case
  4. Select Forward to "NIAL Server"
  5. Data will be copied to: /biomed-resimg/projects5/DICOM_incoming/incoming


Troubleshooting

  1. Check all and retry until success. If retry doesn't appear, refresh page
  2. To check what server is listening to the PACS server, connect to the PACS website, click on "DICOM AE", and search for the name of the lab in the page.
  3. If the transfer continues to fail, it may be necessary to restart the DCM server and try again (runs on pegasus.ia.unc.edu).

$ cd /projects5/DICOM_incoming

$ ./StartDCMServer.script

Rename Files

$ cd /projects5/DICOM_incoming/

$ ./rename.script

Note: If the renaming fails because of a permissions issue, change the group of all of the images from "root" to "res".

Move data to Experiment directory

$ mv /projects5/DICOM_incoming/incoming/*Case* /path/to/experiment

Image Conversion

The raw data is in DICOM format and must be converted to NRRD format. For DWI images, save output as nhdr (to be able to easily modify the header file).

$ DicomConvert --help

$ DicomConvert /Exp/Data/Subj/DICOM /Exp/Processing/Subj/1-Converted/Subj.[nrrd/nhdr]

DWI Image Renaming

After running DicomConvert,

  • Delete the positioning images (named *FLASH*)
  • Delete the the Bruker images (that have 22 images in them, the several last of which SNAP will show as pure noise). If you review, the .nhdr the sizes of these bruker images = 1210 in the following line "sizes: 110 150 1210")
  • Identify the correct order of files on the pacs server
  • Rename the true DWI images as dwi_1.nhdr and dwi_1.raw.gz, dwi_2.nhdr and dwi_2.raw.gz, dwi_3.nhdr and dwi_3.raw.gz
  • edit the .nhdr files to point to the new filenames (ie, dwi_1.raw.gz, dwi_2.raw.gz, dwi_3.raw.gz)
  • Get information from the scanning site to know
    • The gradient directions
    • the b-value
  • Use one of the example file available in /rodent/Examples (the one that seems most adapted)
    • Copy that file into /path/to/your/study/directory/Tools
    • Adapt the header for the current project
      • Modify gradient directions and b-value
      • Modify "sizes" and "space directions"
    • Copy the modified header file from /path/to/your/study/directory/Tools to each subject directory (1-Converted) and rename them as subjectname_dwi.nhdr or something like that.
    • Remember to first edit the new header to verify that the image size and direction matches the information in the current DWI header

Rich created a script (rename_images.py) to automate this renaming/deleting/header modification process.

Run like this in iPython: %run rename_images.py ~/Path/to/Study/Processing/SUBJECT_ID SERIES1 SERIES2 SERIES3

For example: %run rename_images.py ~/Ares/LJC1/Processing/179eb 262145 327681 393217

CCMake here

2. Use script to set up new project directory

Image Registration