
Last chance! 50% off unlimited learning
Sale ends in
header2matrix(hdr, ncol, sep = " ", byrow = TRUE)
extractHeader
.TRUE
) telling the
routine to populate the matrix by rows then columns.length(hdr)
rows and ncol
columns.extractHeader
, matrix
x <- dicomInfo(system.file("dcm/Abdo.dcm", package="oro.dicom"))
pixelSpacing <- extractHeader(x$hdr, "PixelSpacing", numeric=FALSE)
pSmat <- header2matrix(pixelSpacing, ncol=2)
IOP <- extractHeader(x$hdr, "ImageOrientationPatient", numeric=FALSE)
IOPmat <- header2matrix(IOP, ncol=6)
Run the code above in your browser using DataLab