Display a visual of one slice of an image

view_slice(img_data, slice = NULL, col = grDevices::grey(0:64/64), ...)

Arguments

img_data

Image data returned by e.g. read_dicom or read_nifti1

slice

Slice number, or NULL if image is already 2D

col

Color scheme

...

Additional arguments to view_slice_mat

Examples

data(sample_dicom_img)
view_slice(sample_dicom_img, slice = 2)
#> Warning: ImagePositionPatient is moving in more than one dimension.