Functions to test the orientation for a single slice.

is.axial(imageOrientationPatient, axial = c("L", "R", "A", "P"))

is.coronal(imageOrientationPatient, coronal = c("L", "R", "H", "F"))

is.sagittal(imageOrientationPatient, sagittal = c("A", "P", "H", "F"))

Arguments

imageOrientationPatient

A vector of length six taken from the DICOM header field “ImageOrientationPatient”.

axial

Characters that are valid in defining an ‘axial’ slice.

coronal

Characters that are valid in defining a ‘coronal’ slice.

sagittal

Characters that are valid in defining a ‘sagittal’ slice.

Value

Logical value.

See also

Author

Brandon Whitcher bwhitcher@gmail.com

Examples


x <- readDICOMFile(system.file("dcm/Abdo.dcm", package="oro.dicom"))
iop <- header2matrix(extractHeader(x$hdr, "ImageOrientationPatient", FALSE), 6)
is.axial(iop)
#> [1] FALSE
is.coronal(iop)
#> [1] TRUE
is.sagittal(iop)
#> [1] FALSE

x <- readDICOMFile(system.file("dcm/Spine1.dcm", package="oro.dicom"))
iop <- header2matrix(extractHeader(x$hdr, "ImageOrientationPatient", FALSE), 6)
is.axial(iop)
#> Warning: Oblique acquisition in ImageOrientationPatient.
#> [1] FALSE
is.coronal(iop)
#> Warning: Oblique acquisition in ImageOrientationPatient.
#> [1] FALSE
is.sagittal(iop)
#> Warning: Oblique acquisition in ImageOrientationPatient.
#> [1] TRUE