Description Usage Arguments Value Examples
Convert DICOM images to PGM/PPM, PNG, JPEG or BMP using
dcmdump
from DCMTK
1 |
file |
DICOM file name |
outfile |
output file name passed to |
opts |
opts passed to |
... |
options passed to |
Character vector of information
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | if (!have_dcmtk_cmd("dcmj2pnm")) {
install_dir = tempdir()
res = try({
install_dcmtk(install_dir = install_dir)
})
if (inherits(res, "try-error")) {
res = FALSE
}
if (!res) {
source_install_dcmtk(install_dir = install_dir)
}
options(dcmtk.path = install_dir)
}
file = system.file("extdata", "example.dcm", package = "dcmtk")
png_file = dcmj2pnm(file)
print(png_file)
print(file.exists(png_file))
print(normalizePath(png_file))
img = png::readPNG(png_file)
plot(1:2, type='n')
image(img)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.