diff --git a/bin/dcmjs.js b/bin/dcmjs.js index 3a65263..8232c95 100755 --- a/bin/dcmjs.js +++ b/bin/dcmjs.js @@ -44,4 +44,14 @@ program.command('modify') writeDicom(options.out, dicomDict); }) + program.command('rewrite') + .description('Change values in the dicom header') + .argument('', 'part 10 input file path') + .option('-l, --logLevel ', 'logging level, TRACE, DEBUG, INFO, WARN, ERROR, default: WARN') + .option('-o, --out ', 'part 10 output file path') + .action(async (fileName, options) => { + let dicomDict = readDicom(fileName); + writeDicom(options.out, dicomDict); + }) + program.parse();