class_docstr: Wrapper for Siemens format DICOMs
  
  Adds attributes:
  
  * csa_header : mapping
  * b_matrix : (3,3) array
  * q_vector : (3,) array
docstr: Initialize Siemens wrapper
  
  The Siemens-specific information is in the `csa_header`, either
  passed in here, or read from the input `dcm_data`.
  
  Parameters
  ----------
  dcm_data : object
     object should allow 'get' and '__getitem__' access.  If `csa_header`
     is None, it should also be possible to extract a CSA header from
     `dcm_data`. Usually this will be a ``dicom.dataset.Dataset`` object
     resulting from reading a DICOM file.  A dict should also work.
  csa_header : None or mapping, optional
     mapping giving values for Siemens CSA image sub-header.  If
     None, we try and read the CSA information from `dcm_data`.
     If this fails, we fall back to an empty dict.
docstr_tok: ["Initialize","Siemens","wrapper","The","Siemens-specific","information","is","in","the","`","csa_header","`",",","either","passed","in","here",",","or","read","from","the","input","`","dcm_data","`",".","Parameters","--","--","--","--","--","dcm_data",":","object","object","should","allow","'get","'","and","'__getitem__","'","access",".","If","`","csa_header","`","is","None",",","it","should","also","be","possible","to","extract","a","CSA","header","from","`","dcm_data","`",".","Usually","this","will","be","a","``","dicom.dataset.Dataset","``","object","resulting","from","reading","a","DICOM","file",".","A","dict","should","also","work",".","csa_header",":","None","or","mapping",",","optional","mapping","giving","values","for","Siemens","CSA","image","sub-header",".","If","None",",","we","try","and","read","the","CSA","information","from","`","dcm_data","`",".","If","this","fails",",","we","fall","back","to","an","empty","dict","."]
code: def __init__(self, dcm_data, csa_header=None):
      """Initialize Siemens wrapper
  
      The Siemens-specific information is in the `csa_header`, either
      passed in here, or read from the input `dcm_data`.
  
      Parameters
      ----------
      dcm_data : object
         object should allow 'get' and '__getitem__' access.  If `csa_header`
         is None, it should also be possible to extract a CSA header from
         `dcm_data`. Usually this will be a ``dicom.dataset.Dataset`` object
         resulting from reading a DICOM file.  A dict should also work.
      csa_header : None or mapping, optional
         mapping giving values for Siemens CSA image sub-header.  If
         None, we try and read the CSA information from `dcm_data`.
         If this fails, we fall back to an empty dict.
      """
      super().__init__(dcm_data)
      if dcm_data is None:
          dcm_data = {}
      self.dcm_data = dcm_data
      if csa_header is None:
          csa_header = csar.get_csa_header(dcm_data)
          if csa_header is None:
              csa_header = {}
      self.csa_header = csa_header
  
imports: import operator
  import warnings
  import numpy
  from nibabel.optpkg import optional_package
  from ..onetime import auto_attr
  from ..openers import ImageOpener
  from .None import csareader
  from .dwiparams import B2q, nearest_pos_semi_def, q2bg
label_desc: Use image node_id 1 to create a new SiemensWrapper object from inherited base classes: Wrapper with example: obj = SiemensWrapper(dcm_data, csa_header)