class_docstr: Class for MGH format header
  
  The header also consists of the footer data which MGH places after the data
  chunk.
class_docstr_tok: ["Class","for","MGH","format","header","The","header","also","consists","of","the","footer","data","which","MGH","places","after","the","data","chunk","."]
docstr: Set shape of data
  
  Parameters
  ----------
  shape : sequence
     sequence of integers specifying data array shape
docstr_tok: ["Set","shape","of","data","Parameters","--","--","--","--","--","shape",":","sequence","sequence","of","integers","specifying","data","array","shape"]
code: def set_data_shape(self, shape):
      """Set shape of data
  
      Parameters
      ----------
      shape : sequence
         sequence of integers specifying data array shape
      """
      shape = tuple(shape)
      if len(shape) > 4:
          raise ValueError("Shape may be at most 4 dimensional")
      self._structarr["dims"] = shape + (1,) * (4 - len(shape))
      self._structarr["delta"] = 1
  
imports: from os.path import splitext
  import numpy
  from ..affines import from_matvec, voxel_sizes
  from ..arrayproxy import ArrayProxy, reshape_dataobj
  from ..batteryrunners import BatteryRunner, Report
  from ..filebasedimages import SerializableImage
  from ..fileholders import FileHolder
  from ..filename_parser import _stringify_path
  from ..openers import ImageOpener
  from ..spatialimages import HeaderDataError, SpatialHeader, SpatialImage
  from ..volumeutils import Recoder, array_from_file, array_to_file, endian_codes
  from ..wrapstruct import LabeledWrapStruct
label_desc: Use image node_id 16 for calling the MGHHeader obj's underlying member method code with example usage: obj.set_data_shape(shape) without return types