Convert a gdt file and an image folder to a dicom file
- Install
dcmtk, that will give youimg2dcm - Install Rust: https://www.rust-lang.org/tools/install
cargo build
The binary should be built at ./target/debug/gdt2dicom and ./target/debug/dicom2gdt
You can run the binary like this:
./target/debug/gdt2dicom --gdt-file <GDT_FILE> --jpegs <FOLDER CONTAINING JPEGS> --output <OUTPUT DCM PATH>
By default it searches for a xml file for Dicom in the jpegs folder (#5),
if it cannot find one it uses a default file. You can also specify the xml file with the -d or --dicom-xml flag.
You can convert Dicom 2 GDT as well.
./target/debug/dicom2gdt --dicom-file <DCM FILE> [--gdt-file <GDT FILE>] [--jpegs <PATH TO JPEGS>]
--gdt-fileor-gis optional, when it's not present, it will be outputed to stdout.--jpegsor-jis optional, when it's not present, images will not be exported.
You can convert a GDT file to a Worklist file doing
gdt2dicom --gdt-file epat.gdt --output epat.wl
./target/debug/gdt2opp --gdt-file <DCM FILE> --output opp.xml