antsImageHeaderInfo: Read file info from image header

View source: R/antsImageHeaderInfo.R

antsImageHeaderInfoR Documentation

Read file info from image header

Description

Read file info from image header

Usage

antsImageHeaderInfo(filename)

Arguments

filename

name of image file to scan for info

Value

outputs a list containing:

  • pixelclass: Type of pixel (scalar, vector, etc).

  • pixeltype: Type of pixel values (int, float, etc).

  • nDimensions: Number of image dimensions.

  • nComponents: Number of pixel dimensions.

  • dimensions: Size of image dimensions.

  • spacing: Pixel resolution.

  • origin: Spatial origin of image

  • pixelclass: Spatial directions of image axes.

Author(s)

Duda JT

Examples

antsImageHeaderInfo(getANTsRData("r16"))

img <- antsImageRead(getANTsRData("r16"))
antsImageHeaderInfo(img)
antsImageHeaderInfo(getANTsRData("r16"))
testthat::expect_error(antsImageHeaderInfo(""))

stnava/ANTsR documentation built on April 16, 2024, 12:17 a.m.