dicomtk provides a complete medical image visualization
pipeline built on native C++17 pixel extraction
(read_dicom_pixels()), VOI LUT window/level presets
(dicom_window()), composable ggplot2 rendering
(plot_dicom() / ggdicom()), an interactive
Shiny viewer (dicom_viewer()), and 3D
volumetric rendering (render_volume()).
read_dicom_pixels() decodes 8-bit, 16-bit, or 32-bit
monochrome and RGB pixel streams (including RLE-compressed frames) and
applies Modality LUT rescaling (RescaleSlope and
RescaleIntercept):
ggplot2 Rendering (plot_dicom()
& ggdicom())
# Add custom ggplot2 annotations on top of ggdicom()
ggdicom(dcm_file, palette = "inferno", annotate = FALSE) +
labs(title = "Inferno Colormap with Custom ggplot2 Layer")series <- read_dicom_series(c(dcm_file, dcm_file, dcm_file))
series
#> ℹ DICOM Series: 512 x 512 x 3 slices (3 files)
# 3-Plane Orthogonal MPR
render_volume(series, method = "mpr")
# 3-Plane Maximum Intensity Projection (MIP)
render_volume(series, method = "mip", palette = "viridis")