dcmtk_cmd_path: Get path for DCMTK command

Description Usage Arguments Value Examples

View source: R/dcmtk_cmd_path.R

Description

Uses Sys.which to check if command is in the PATH.

Usage

1

Arguments

cmd

DCMTK command name

Value

Logical TRUE if command is available.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
if (!have_dcmtk_cmd("dcmodify")) {
install_dir = tempdir()
options(dcmtk.path = install_dir)
  res = try({
    install_dcmtk(install_dir = install_dir)
  })
  if (inherits(res, "try-error")) {
    res = FALSE
  }
  if (!res) {
    source_install_dcmtk(install_dir = install_dir)
  }
}
dcmtk_cmd("dcmodify")

muschellij2/dcmtk documentation built on March 17, 2021, 9:11 p.m.