class_docstr: Class to wrap general DICOM files
  
  Methods:
  
  * get_data()
  * get_pixel_array()
  * is_same_series(other)
  * __getitem__ : return attributes from `dcm_data`
  * get(key[, default]) - as usual given __getitem__ above
  
  Attributes and things that look like attributes:
  
  * affine : (4, 4) array
  * dcm_data : object
  * image_shape : tuple
  * image_orient_patient : (3,2) array
  * slice_normal : (3,) array
  * rotation_matrix : (3,3) array
  * voxel_sizes : tuple length 3
  * image_position : sequence length 3
  * slice_indicator : float
  * series_signature : tuple
docstr: Mapping between voxel and DICOM coordinate system
  
  (4, 4) affine matrix giving transformation between voxels in data array
  and mm in the DICOM patient coordinate system.
docstr_tok: ["Mapping","between","voxel","and","DICOM","coordinate","system","(","4",",","4",")","affine","matrix","giving","transformation","between","voxels","in","data","array","and","mm","in","the","DICOM","patient","coordinate","system","."]
code: def affine(self):
      """Mapping between voxel and DICOM coordinate system
  
      (4, 4) affine matrix giving transformation between voxels in data array
      and mm in the DICOM patient coordinate system.
      """
      # rotation matrix already accounts for the ij transpose in the
      # DICOM image orientation patient transform.  So. column 0 is
      # direction cosine for changes in row index, column 1 is
      # direction cosine for changes in column index
      orient = self.rotation_matrix
      # therefore, these voxel sizes are in the right order (row,
      # column, slice)
      vox = self.voxel_sizes
      ipp = self.image_position
      if any(p is None for p in (orient, vox, ipp)):
          raise WrapperError("Not enough information for affine")
      aff = np.eye(4)
      aff[:3, :3] = orient * np.array(vox)
      aff[:3, 3] = ipp
      return aff
  
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 13 for calling the Wrapper obj's underlying member method code with example usage: obj.affine() and returns: aff