file = system.file("extdata", "example.nii.gz", package = "RNifti")
img = RNifti::readNifti(file)
srow_x(img)
srow_x(img) = rep(0, 4)
stopifnot(srow_x(img) == rep(0, 4))
srow_y(img)
srow_y(img) = rep(0, 4)
stopifnot(srow_y(img) == rep(0, 4))
srow_z(img)
srow_z(img) = rep(0, 4)
stopifnot(srow_z(img) == rep(0, 4))
Run the code above in your browser using DataLab