Giter Club home page Giter Club logo

dicomtree.jl's Introduction

DICOMTree

A little Julia package for visualizing DICOM file metadata in the form of a tree. The main function is the Tree function, which is simply a dispatch of the eponymous function in the Term.jl package to the DICOMData type in the DICOM.jl package. The package have been tested with CT Scanner, RTDose and RTStruct files.

DICOMTree Logo

Documentation & installation

Install with:

julia> ]  # enters the pkg interface
pkg> add DICOMTree

How to use DICOMTree.jl ?

using DICOM
using DICOMTree

dcm_file = dcm_parse(dcm_path)

Tree(dcm_file, with_keys = false, maxdepth = 2)

Output (with colours in the REPL) :

PatientID
  ├─ StructureSetName ⇒ ART: Unapproved
  ├─ StudyDate ⇒ 12345678
  ├─ StructureSetROISequence ⇒ Vector of DICOMData
  │                              └─ Length ⇒ 46
  │
  ├─ SeriesInstanceUID ⇒ 1.2.276
  ├─ MediaStorageSOPClassUID ⇒ 1.2.840
  ├─ SoftwareVersions ⇒ v1.0
  ├─ ImplementationVersionName ⇒ OFFIS_DCMTK_364
  ├─ Modality ⇒ RTSTRUCT
  ├─ PatientName ⇒ xxx
  ├─ OperatorsName ⇒ xxx
  ├─ ApprovalStatus ⇒ UNAPPROVED
  ├─ InstitutionName ⇒ Any[]
  │
  ├─ ReferencedFrameOfReferenceSequence ⇒ Vector of DICOMData
  │                                         └─ Length ⇒ 1
  │
  ├─ SOPInstanceUID ⇒ 1.2.276
  ├─ SpecificCharacterSet ⇒ ISO_IR 100
  ├─ PatientID ⇒ xxx
  ├─ ImplementationClassUID ⇒ 1.2.276
  ├─ StudyTime ⇒ xxx
  ├─ StructureSetTime ⇒ 123456
  ├─ StudyDescription ⇒ Brain
  ├─ ROIContourSequence ⇒ Vector of DICOMData
  │                         └─ Length ⇒ 46
  │
  ├─ ReviewTime ⇒ Any[]
  │
  ├─ StudyID ⇒ 123456
  ├─ SeriesNumber ⇒ 1
  ├─ SOPClassUID ⇒ 1.2.840
  ├─ StudyInstanceUID ⇒ 1.2.826
  ├─ TransferSyntaxUID ⇒ 1.2.840
  ├─ AccessionNumber ⇒ Any[]
  │
  ├─ StructureSetDate ⇒ 12345678
  ├─ ManufacturerModelName ⇒ xxx
  ├─ PatientSex ⇒ Any[]
  │
  ├─ InstanceNumber ⇒ 1
  ├─ FileMetaInformationGroupLength ⇒ 202
  ├─ ReferringPhysicianName ⇒ Unspecified
  ├─ Manufacturer ⇒ Company
  ├─ ReviewDate ⇒ Any[]
  │
  ├─ InstanceCreationTime ⇒ 123456
  ├─ FileMetaInformationVersion ⇒ UInt8[0x00, 0x01]
  │
  ├─ RTROIObservationsSequence ⇒ Vector of DICOMData
  │                                └─ Length ⇒ 46
  │
  ├─ MediaStorageSOPInstanceUID ⇒ 1.2.276
  ├─ StructureSetLabel ⇒ ART: Unapproved
  ├─ SeriesDescription ⇒ xxx
  ├─ PatientBirthDate ⇒ 12345678
  └─ InstanceCreationDate ⇒ 12345678
  • with_keys = true will replace the name with the associated tag (e.g. : (0x0010, 0x0020) if true and PatientID if false). Default is false.

  • maxdepth defines the depth at which the DICOM tree is explored. Default is 2. Note that a high scan depth may take a few seconds to be displayed.

Then, we can focus on a specific tag :

Tree(dcm_file.ROIContourSequence, maxdepth = 3)

Output (with colours in the REPL) :

└─ 1 ⇒
           ├─ ContourSequence ⇒
           │                      ├─ 1 ⇒
           │                      │        ├─ ContourGeometricType ⇒ CLOSED_PLANAR
           │                      │        ├─ ContourData ⇒ Vector
           │                      │        │                  ├─ Length ⇒ 3948
           │                      │        │                  ├─ ElementsType ⇒ Float64
           │                      │        │                  └─ Overview ⇒ [5.12, -245.33, -124.0, ..., -124.0, 4.4, -245.2]
           │                      │        │
           │                      │        ├─ ContourNumber ⇒ 0
           │                      │        ├─ NumberOfContourPoints ⇒ 1316
           │                      │        └─ ContourImageSequence ⇒ Vector of DICOMData
           │                      │                                    └─ Length ⇒ 1
           │                      │
           │                      │
           │                      ├─ 2 ⇒
           │                      │        ├─ ContourGeometricType ⇒ CLOSED_PLANAR
           │                      │        ├─ ContourData ⇒ Vector
           │                      │        │                  ├─ Length ⇒ 3936
           │                      │        │                  ├─ ElementsType ⇒ Float64
           │                      │        │                  └─ Overview ⇒ [12.78, -245.33, -122.0, ..., -122.0, 12.06, -245.2]
           │                      │        │
           │                      │        ├─ ContourNumber ⇒ 1
           │                      │        ├─ NumberOfContourPoints ⇒ 1312
           │                      │        └─ ContourImageSequence ⇒ Vector of DICOMData
           │                      │                                    └─ Length ⇒ 1
           ...

dicomtree.jl's People

Contributors

fdekerme avatar

Stargazers

Dennis Ogiermann avatar Jacob S. Zelko avatar aTrotier avatar  avatar  avatar

Watchers

 avatar  avatar

dicomtree.jl's Issues

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

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.