Skip to content

ebremer/dcm2rdf

Repository files navigation

dcm2rdf

dcm2rdf

Design philosophy - create a good faith RDF representation of DICOM metadata.

This program will read a specified source directory containing DICOM files and create a matching folder with the same folder hierachy as the source and with the same file names but with a RDF turtle ".ttl" extension. This program's output has been modified to match and implement various discussions that have occurred within a community of people interested working with DICOM using a RDF tool chain.

This program is hardly the first of it's kind with several papers written on the subject.

*** Please note - this is a community effort and is not offical, nor part of the DICOM standard

About this program

It it a Java program developed using the GraalVM which will allow you to run the program as a Java runnable jar or as a native image not requiring a JDK/JRE to be installed. It is built upon Apache Jena and the DCM4CHE libraries.

Building dcm2rdf jar version

  1. Must have working JDK21 environment
  2. mvn -Pjar clean package
  3. A runnable jar version "dcm2rdf-1.0.0.jar" will be in the target folder

java -jar dcm2rdf-1.0.0.jar -help will display instructions.

Building platform specific stand-alone

  1. Must have at least JDK23 GraalVM CE 23.0.1+11.1 installed with fully functional native-image build enviroment for the platform you are building for.
  2. mvn -Pnative clean native:compile
  3. Artifact "dcm2rdf" will be in target folder.

dcm2rdf -help will display instructions.

Roadmap

  1. A paper documenting the referenced community effort.
  2. More documentation
  3. Support other RDF serializations (only outputs Turtle at the moment)
  4. Link program output with existing official DICOM RDF terminology.
  5. DICOM SHACL development
  6. and much much more...

Usage

Usage: dcm2rdf [options]
  Options:
  * -src
      Source Folder or File
  * -dest
      Destination Folder or File
    -t
      # of threads for processing.  Generally, one thread per file.
      Default: 1
    -c
      results file will be gzipped compressed
      Default: false
    -L
      Perform minimal conversion to RDF.  Warning - turns all tweaks and
      optimizations off!
      Default: false
    -version
      Display software version
      Default: false
    -status
      Display progress in real-time.
      Default: false
    -overwrite
      Overwrite results files.
      Default: false
    -help, -h
      Display help information
      Default: false
    -extra
      Add source file URI, file size
      Default: false
    -naming
      Subject method (SOPInstanceUID, SHA256)
      Default: SOPInstanceUID
    -oid
      Convert UI VRs to urn:oid:<oid>
      Default: false
    -hash
      Calculate SHA256 Hashes. Implied with SHA256 naming option.
      Default: false
    -level
      Sets logging level (OFF, ALL, WARNING, SEVERE)
      Default: SEVERE
    -wkt
      Known polygons expressed as GeoSPARQL WKT
      Default: false
    -detlef
      Detlefication - Generate URNs for bnodes in Sequences
      Default: false
    -cdt
      Convert lists to complex data types (CDT)
      Default: false
    -cdtlevel
      if cdt is true, only do mapping if list length is greater than this
      value
      Default: 4
    -ptags
      if ptags is true, add alternate private tag representation
      Default: false
    -includeinlinebinary
      will empty the inline binaries in the RDF file
      Default: false
    -keywords
      Use keyword predicates instead of the tag-based
      Default: false

References

About

A program to extract DICOM metadata and represent it as RDF

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages