NiBabel

Access a cacophony of neuro-imaging file formats

Previous topic

nibabel.nicom.dicomwrappers.MosaicWrapper

Next topic

nibabel.nicom.dicomwrappers.Wrapper

Reggie -- the one

nibabel.nicom.dicomwrappers.SiemensWrapper

digraph inheritance40bee99584 { rankdir=LR; ratio=compress; fontsize=14; size="6.0, 8.0"; "SiemensWrapper" [shape=ellipse,URL="#nibabel.nicom.dicomwrappers.SiemensWrapper",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; "Wrapper" -> "SiemensWrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; "Wrapper" [shape=ellipse,URL="nibabel.nicom.dicomwrappers.Wrapper.html#nibabel.nicom.dicomwrappers.Wrapper",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; }

class nibabel.nicom.dicomwrappers.SiemensWrapper(dcm_data=None, csa_header=None)

Wrapper for Siemens format DICOMs

Adds attributes:

  • csa_header : mapping
  • b_matrix : (3,3) array
  • q_vector : (3,) array

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 : None or object, optional

object should allow attribute 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. If None, we just make an empty dict.

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.

static b_matrix()

Get DWI B matrix referring to voxel space

Parameters :

None :

Returns :

B : (3,3) array or None

B matrix in voxel orientation space. Returns None if this is not a Siemens header with the required information. We return None if this is a b0 acquisition

static q_vector()

Get DWI q vector referring to voxel space

Parameters :

None :

Returns :

q: (3,) array :

Estimated DWI q vector in voxel orientation space. Returns None if this is not (detectably) a DWI

static series_signature()

Add ICE dims from CSA header to signature

static slice_normal()