class_docstr: PAR/REC header
class_docstr_tok: ["PAR\/REC","header"]
docstr: Scan image definitions and return unique value of a property.
  
  * Get array for named field of ``self.image_defs``;
  * Check that all rows in the array are the same and raise error
    otherwise;
  * Return the row.
  
  Parameters
  ----------
  name : str
      Name of the property in ``self.image_defs``
  
  Returns
  -------
  unique_value : scalar or array
  
  Raises
  ------
  PARRECError
      if the rows of ``self.image_defs[name]`` do not all compare equal.
docstr_tok: ["Scan","image","definitions","and","return","unique","value","of","a","property",".","*","Get","array","for","named","field","of","``","self.image_defs","``",";","*","Check","that","all","rows","in","the","array","are","the","same","and","raise","error","otherwise",";","*","Return","the","row",".","Parameters","--","--","--","--","--","name",":","str","Name","of","the","property","in","``","self.image_defs","``","Returns","--","--","--","-","unique_value",":","scalar","or","array","Raises","--","--","--","PARRECError","if","the","rows","of","``","self.image_defs","[","name","]","``","do","not","all","compare","equal","."]
code: def _get_unique_image_prop(self, name):
      """Scan image definitions and return unique value of a property.
  
      * Get array for named field of ``self.image_defs``;
      * Check that all rows in the array are the same and raise error
        otherwise;
      * Return the row.
  
      Parameters
      ----------
      name : str
          Name of the property in ``self.image_defs``
  
      Returns
      -------
      unique_value : scalar or array
  
      Raises
      ------
      PARRECError
          if the rows of ``self.image_defs[name]`` do not all compare equal.
      """
      props = self.image_defs[name]
      if np.any(np.diff(props, axis=0)):
          raise PARRECError(
              f"Varying {name} in image sequence ({props}). This is not supported."
          )
      return props[0]
  
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 11 for calling the PARRECHeader obj's underlying member method code with example usage: obj._get_unique_image_prop(name) and returns: props