tests/testthat/test_orientation.R

context("Orientation")

abdo <- readDICOMFile(system.file("dcm/Abdo.dcm", package="oro.dicom"))
iop <- header2matrix(extractHeader(abdo$hdr, "ImageOrientationPatient", FALSE), 6)

test_that("Get the orientation", {
  expect_equal(getOrientation(iop), "L")
  expect_equal(is.axial(iop), FALSE)
  expect_equal(is.coronal(iop), TRUE)
  expect_equal(is.sagittal(iop), FALSE)
})

Try the oro.dicom package in your browser

Any scripts or data that you put into this service are public.

oro.dicom documentation built on Oct. 30, 2019, 9:59 a.m.