class_docstr: Class for basic analyze header
  
  Implements zoom-only setting of affine transform, and no image
  scaling
class_docstr_tok: ["Class","for","basic","analyze","header","Implements","zoom-only","setting","of","affine","transform",",","and","no","image","scaling"]
docstr: Initialize header from binary data block
  
  Parameters
  ----------
  binaryblock : {None, string} optional
      binary block to set into header.  By default, None, in
      which case we insert the default empty header block
  endianness : {None, '<','>', other endian code} string, optional
      endianness of the binaryblock.  If None, guess endianness
      from the data.
  check : bool, optional
      Whether to check content of header in initialization.
      Default is True.
  
  Examples
  --------
  >>> hdr1 = AnalyzeHeader() # an empty header
  >>> hdr1.endianness == native_code
  True
  >>> hdr1.get_data_shape()
  (0,)
  >>> hdr1.set_data_shape((1,2,3)) # now with some content
  >>> hdr1.get_data_shape()
  (1, 2, 3)
  
  We can set the binary block directly via this initialization.
  Here we get it from the header we have just made
  
  >>> binblock2 = hdr1.binaryblock
  >>> hdr2 = AnalyzeHeader(binblock2)
  >>> hdr2.get_data_shape()
  (1, 2, 3)
  
  Empty headers are native endian by default
  
  >>> hdr2.endianness == native_code
  True
  
  You can pass valid opposite endian headers with the
  ``endianness`` parameter. Even empty headers can have
  endianness
  
  >>> hdr3 = AnalyzeHeader(endianness=swapped_code)
  >>> hdr3.endianness == swapped_code
  True
  
  If you do not pass an endianness, and you pass some data, we
  will try to guess from the passed data.
  
  >>> binblock3 = hdr3.binaryblock
  >>> hdr4 = AnalyzeHeader(binblock3)
  >>> hdr4.endianness == swapped_code
  True
docstr_tok: ["Initialize","header","from","binary","data","block","Parameters","--","--","--","--","--","binaryblock",":","{","None",",","string","}","optional","binary","block","to","set","into","header",".","By","default",",","None",",","in","which","case","we","insert","the","default","empty","header","block","endianness",":","{","None",",","'","<","'",",","'",">","'",",","other","endian","code","}","string",",","optional","endianness","of","the","binaryblock",".","If","None",",","guess","endianness","from","the","data",".","check",":","bool",",","optional","Whether","to","check","content","of","header","in","initialization",".","Default","is","True",".","Examples","--","--","--","--",">",">",">","hdr1","=","AnalyzeHeader","(",")","#","an","empty","header",">",">",">","hdr1.endianness","==","native_code","True",">",">",">","hdr1.get_data_shape","(",")","(","0",",",")",">",">",">","hdr1.set_data_shape","(","(","1,2,3",")",")","#","now","with","some","content",">",">",">","hdr1.get_data_shape","(",")","(","1",",","2",",","3",")","We","can","set","the","binary","block","directly","via","this","initialization",".","Here","we","get","it","from","the","header","we","have","just","made",">",">",">","binblock2","=","hdr1.binaryblock",">",">",">","hdr2","=","AnalyzeHeader","(","binblock2",")",">",">",">","hdr2.get_data_shape","(",")","(","1",",","2",",","3",")","Empty","headers","are","native","endian","by","default",">",">",">","hdr2.endianness","==","native_code","True","You","can","pass","valid","opposite","endian","headers","with","the","``","endianness","``","parameter",".","Even","empty","headers","can","have","endianness",">",">",">","hdr3","=","AnalyzeHeader","(","endianness=swapped_code",")",">",">",">","hdr3.endianness","==","swapped_code","True","If","you","do","not","pass","an","endianness",",","and","you","pass","some","data",",","we","will","try","to","guess","from","the","passed","data",".",">",">",">","binblock3","=","hdr3.binaryblock",">",">",">","hdr4","=","AnalyzeHeader","(","binblock3",")",">",">",">","hdr4.endianness","==","swapped_code","True"]
code: def __init__(self, binaryblock=None, endianness=None, check=True):
      """Initialize header from binary data block
  
      Parameters
      ----------
      binaryblock : {None, string} optional
          binary block to set into header.  By default, None, in
          which case we insert the default empty header block
      endianness : {None, '<','>', other endian code} string, optional
          endianness of the binaryblock.  If None, guess endianness
          from the data.
      check : bool, optional
          Whether to check content of header in initialization.
          Default is True.
  
      Examples
      --------
      >>> hdr1 = AnalyzeHeader() # an empty header
      >>> hdr1.endianness == native_code
      True
      >>> hdr1.get_data_shape()
      (0,)
      >>> hdr1.set_data_shape((1,2,3)) # now with some content
      >>> hdr1.get_data_shape()
      (1, 2, 3)
  
      We can set the binary block directly via this initialization.
      Here we get it from the header we have just made
  
      >>> binblock2 = hdr1.binaryblock
      >>> hdr2 = AnalyzeHeader(binblock2)
      >>> hdr2.get_data_shape()
      (1, 2, 3)
  
      Empty headers are native endian by default
  
      >>> hdr2.endianness == native_code
      True
  
      You can pass valid opposite endian headers with the
      ``endianness`` parameter. Even empty headers can have
      endianness
  
      >>> hdr3 = AnalyzeHeader(endianness=swapped_code)
      >>> hdr3.endianness == swapped_code
      True
  
      If you do not pass an endianness, and you pass some data, we
      will try to guess from the passed data.
  
      >>> binblock3 = hdr3.binaryblock
      >>> hdr4 = AnalyzeHeader(binblock3)
      >>> hdr4.endianness == swapped_code
      True
      """
      super().__init__(binaryblock, endianness, check)
  
imports: from __future__ import annotations
  import numpy
  from .arrayproxy import ArrayProxy
  from .arraywriters import ArrayWriter, WriterError, get_slope_inter, make_array_writer
  from .batteryrunners import Report
  from .fileholders import copy_file_map
  from .spatialimages import HeaderDataError, HeaderTypeError, SpatialHeader, SpatialImage
  from .volumeutils import apply_read_scaling, array_from_file, make_dt_codes, native_code, seek_tell, shape_zoom_affine, swapped_code
  from .wrapstruct import LabeledWrapStruct
label_desc: Use image node_id 1 to create a new AnalyzeHeader object from inherited base classes: LabeledWrapStruct, SpatialHeader with example: obj = AnalyzeHeader(binaryblock, endianness, check)