R/create_header_npy.R

Defines functions create_header_npy

# Retrieves NIFTI header information from images in directory
#
# Returns a RIA_header object containing the NIFTI header information as a list
# (c): Márton Kolossváry, 2018


create_header_npy <- function(directory, PixelSpacing, SpacingBetweenSlices)
{
  header_list <- list()

  header_list[["PixelSpacing"]] <- PixelSpacing
  header_list[["SpacingBetweenSlices"]] <- SpacingBetweenSlices
  
  if(!any(class(header_list) == "RIA_header")) class(header_list) <- append(class(header_list), "RIA_header")
  
  return(header_list)
}

Try the RIA package in your browser

Any scripts or data that you put into this service are public.

RIA documentation built on May 31, 2023, 7 p.m.