class_docstr: Class to wrap MINC1 format opened netcdf object
  
  Although it has some of the same methods as a ``Header``, we use
  this only when reading a MINC file, to pull out useful header
  information, and for the method of reading the data out
docstr: Return valid range for image data
  
  The valid range can come from the image 'valid_range' or
  image 'valid_min' and 'valid_max', or, failing that, from the
  data type range
docstr_tok: ["Return","valid","range","for","image","data","The","valid","range","can","come","from","the","image","'valid_range","'","or","image","'valid_min","'","and","'valid_max","'",",","or",",","failing","that",",","from","the","data","type","range"]
code: def _get_valid_range(self):
      """Return valid range for image data
  
      The valid range can come from the image 'valid_range' or
      image 'valid_min' and 'valid_max', or, failing that, from the
      data type range
      """
      ddt = self.get_data_dtype()
      info = np.iinfo(ddt.type)
      try:
          valid_range = self._image.valid_range
      except AttributeError:
          try:
              valid_range = [
                  self._image.valid_min,
                  self._image.valid_max,
              ]
          except AttributeError:
              valid_range = [info.min, info.max]
      if valid_range[0] < info.min or valid_range[1] > info.max:
          raise ValueError("Valid range outside input data type range")
      return np.asarray(valid_range, dtype=np.float64)
  
imports: from __future__ import annotations
  from numbers import Integral
  import numpy
  from .externals.netcdf import netcdf_file
  from .fileslice import canonical_slicers
  from .spatialimages import SpatialHeader, SpatialImage
label_desc: Use image node_id 7 for calling the Minc1File obj's underlying member method code with example usage: obj._get_valid_range() and returns: np