class_docstr: PAR/REC header
class_docstr_tok: ["PAR\/REC","header"]
docstr: Parameters
  ----------
  info : dict
      "General information" from the PAR file (as returned by
      `parse_PAR_header()`).
  image_defs : array
      Structured array with image definitions from the PAR file (as
      returned by `parse_PAR_header()`).
  permit_truncated : bool, optional
      If True, a warning is emitted instead of an error when a truncated
      recording is detected.
  strict_sort : bool, optional, keyword-only
      If True, a larger number of header fields are used while sorting
      the REC data array.  This may produce a different sort order than
      `strict_sort=False`, where volumes are sorted by the order in which
      the slices appear in the .PAR file.
docstr_tok: ["Parameters","--","--","--","--","--","info",":","dict","``","General","information","''","from","the","PAR","file","(","as","returned","by","`","parse_PAR_header","(",")","`",")",".","image_defs",":","array","Structured","array","with","image","definitions","from","the","PAR","file","(","as","returned","by","`","parse_PAR_header","(",")","`",")",".","permit_truncated",":","bool",",","optional","If","True",",","a","warning","is","emitted","instead","of","an","error","when","a","truncated","recording","is","detected",".","strict_sort",":","bool",",","optional",",","keyword-only","If","True",",","a","larger","number","of","header","fields","are","used","while","sorting","the","REC","data","array",".","This","may","produce","a","different","sort","order","than","`","strict_sort=False","`",",","where","volumes","are","sorted","by","the","order","in","which","the","slices","appear","in","the",".PAR","file","."]
code: def __init__(
      self, info, image_defs, permit_truncated=False, strict_sort=False
  ):
      """
      Parameters
      ----------
      info : dict
          "General information" from the PAR file (as returned by
          `parse_PAR_header()`).
      image_defs : array
          Structured array with image definitions from the PAR file (as
          returned by `parse_PAR_header()`).
      permit_truncated : bool, optional
          If True, a warning is emitted instead of an error when a truncated
          recording is detected.
      strict_sort : bool, optional, keyword-only
          If True, a larger number of header fields are used while sorting
          the REC data array.  This may produce a different sort order than
          `strict_sort=False`, where volumes are sorted by the order in which
          the slices appear in the .PAR file.
      """
      self.general_info = info.copy()
      self.image_defs = image_defs.copy()
      self.permit_truncated = permit_truncated
      self.strict_sort = strict_sort
      _truncation_checks(info, image_defs, permit_truncated)
      # charge with basic properties to be able to use base class
      # functionality
      # dtype
      bitpix = self._get_unique_image_prop("image pixel size")
      if bitpix not in (8, 16):
          raise PARRECError(
              f"Only 8- and 16-bit data supported (not {bitpix}) "
              "please report this to the nibabel developers"
          )
      # REC data always little endian
      dt = np.dtype("uint" + str(bitpix)).newbyteorder("<")
      super().__init__(
          data_dtype=dt,
          shape=self._calc_data_shape(),
          zooms=self._calc_zooms(),
      )
  
imports: import re
  import warnings
  from collections import OrderedDict
  from copy import deepcopy
  from io import StringIO
  from locale import getpreferredencoding
  import numpy
  from .affines import apply_affine, dot_reduce, from_matvec
  from .eulerangles import euler2mat
  from .fileslice import fileslice, strided_scalar
  from .nifti1 import unit_codes
  from .openers import ImageOpener
  from .spatialimages import SpatialHeader, SpatialImage
  from .volumeutils import Recoder, array_from_file
label_desc: Use image node_id 1 to create a new PARRECHeader object from inherited base classes: SpatialHeader with example: obj = PARRECHeader(info, image_defs, permit_truncated, strict_sort)