Giter Site home page Giter Site logo

nrrdify's Introduction

Warning: these scripts have not been widely tested and should only be used in research.

These scripts convert directories of DICOM data into nrrd files using 3D Slicer's DWIConvert utility.

  • convertall.py - runs DWIConvert on all series folders in the hard coded directory structure

    • input is dicom directory (currently hard coded)
    • output is directory named "converted" with the same patient/study naming convention but with each study directory containing a series file as a .nrrd along with the output stdout and stderr of the converter command for diagnostic purposes.
    • a convert.log.txt at the top level of the converted directory is kept for overall diagnostics
    • NOTE outuput of this is still PHI
  • renameNRRDs.py - removes patient ID

    • input is a directory output from convertall.py
    • output is a directory of the form: `converted-rename/patient-#####/patient-#####-study-#####/patient-#####-study-#####-series-##.nrrd (No identifiers, just images)
    • creates a patientMap.json that maps MRN to patient-##### (contains PHI)
    • creates a studyMap.json that maps MRN and original study subdirectory name to study-##### (contains PHI)
  • studyMeta.sh creates tables of patient ID information (optional - an example of how to extract data at the study level)

    • in the source data directory (hardcoded) creates the following:
      • studyMeta.dump with a line for StudyData,PatientID,PatientAge for each study (contains PHI)
      • studyMeta.txt with same data on one line (contains PHI)

Background: These scripts were developed to process dicom directories in the format exported from the Partners mi2b2 system and would need to be customized for any other use.

Usage: These have been used on a mac, but probably also work unchanged on linux, but not on windows unless using a linux compatibility layer.

TODO: These script could be useful for other purposes and should be generalized at some point to handle different directory layouts and command line options.

Sponsored by: MI2B2 ENABLED PEDIATRIC RADIOLOGICAL DECISION SUPPORT, NIH grant R01EB014947

nrrdify's People

Contributors

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