tests/testthat/test_header.R

context("Working with headers")

abdo <- readDICOMFile(system.file("dcm/Abdo.dcm", package="oro.dicom"))

test_that("Extract", {
  expect_equal(extractHeader(abdo$hdr, "Modality", numeric=FALSE), "MR")
  expect_equal(extractHeader(abdo$hdr, "SliceThickness"), 10)
  expect_equal(extractHeader(abdo$hdr, "ImageType", FALSE), "ORIGINAL PRIMARY OTHER M SE")
})

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.