xBitTo8Bit | R Documentation |
Convert gray scale from measured bits to 8bit
xBitTo8Bit(im, bits)
im |
Matrix of values in x bits |
bits |
Number of bits of the original gray scale |
Matrix of gray scale values in 8bits
library(oro.dicom)
file_path <- system.file("extdata", "disk.dcm", package = "CTRing")
dcm <- readDICOM(file_path)
hdr_df <- dcm$hdr[[1]]
image_info <- getImageInfo(hdr = hdr_df)
im <- imageToMatrix(dcm$img)
range(im)
im_8bit <- xBitTo8Bit(im, image_info$grayScale)
range(im_8bit)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.