Skip to content

Latest commit

 

History

History
133 lines (120 loc) · 5.59 KB

File metadata and controls

133 lines (120 loc) · 5.59 KB

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 hierarchy as the source and with the same file names but with an RDF extension (".ttl" Turtle by default, or ".nt" N-Triples via -format, optionally gzipped via -c). This program's output has been modified to match and implement various discussions that have occurred within a community of people interested in working with DICOM using a RDF tool chain.

This program is hardly the first of its kind with several papers written on the subject.

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

About this program

It is 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 JDK25 environment
  2. mvn -Pjar clean package
  3. A runnable jar version "dcm2rdf-1.3.0.jar" will be in the target folder

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

Building platform specific stand-alone

  1. Must have at least JDK25 GraalVM CE 25.0.2 installed with fully functional native-image build environment 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. More RDF serializations (Turtle and N-Triples are supported via -format)
  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, SEVERE, WARNING, INFO, CONFIG, FINE, FINER,
      FINEST, ALL)
      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
      Include inline binary data in the RDF output (default: emitted as empty
      base64 literals)
      Default: false
    -keywords
      Use keyword predicates instead of the tag-based
      Default: false
    -format
      RDF format type (TTL or NT)
      Default: TTL
    -logdir
      Directory for the run log file (only created if something is logged)
      Default: .

References