digraph inheritance823f9afeb3 { rankdir=LR; ratio=compress; fontsize=14; size="6.0, 8.0"; "Wrapper" [shape=ellipse,URL="#nibabel.nicom.dicomwrappers.Wrapper",fontname=Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans,fontsize=14,color=dodgerblue1,style=filled,height=0.75]; }
Class to wrap general DICOM files
Methods:
Attributes and things that look like attributes:
Attributes
b_matrix | |
q_vector |
Methods
get | |
get_affine | |
get_data | |
get_pixel_array | |
image_orient_patient | |
image_position | |
image_shape | |
instance_number | |
is_same_series | |
rotation_matrix | |
series_signature | |
slice_indicator | |
slice_normal | |
voxel_sizes |
Initialize wrapper
Parameters : | dcm_data : None or object, optional
|
---|
Attributes
b_matrix | |
q_vector |
Methods
get | |
get_affine | |
get_data | |
get_pixel_array | |
image_orient_patient | |
image_position | |
image_shape | |
instance_number | |
is_same_series | |
rotation_matrix | |
series_signature | |
slice_indicator | |
slice_normal | |
voxel_sizes |
Return mapping between voxel and DICOM coordinate system
Parameters : | None : |
---|---|
Returns : | aff : (4,4) affine
|
Get scaled image data from DICOMs
We return the data as DICOM understands it, first dimension is rows, second dimension is columns
Returns : | data : array
|
---|
Return unscaled pixel array from DICOM
Note that this is _not_ LR flipped
Return position of first voxel in data block
Parameters : | None : |
---|---|
Returns : | img_pos : (3,) array
|
The array shape as it will be returned by get_data()
Just because we use this a lot for sorting
Return True if other appears to be in same series
Parameters : | other : object
|
---|---|
Returns : | tf : bool
|
Return rotation matrix between array indices and mm
Note that we swap the two columns of the ‘ImageOrientPatient’ when we create the rotation matrix. This is takes into account the slightly odd ij transpose construction of the DICOM orientation fields - see doc/theory/dicom_orientaiton.rst.
Signature for matching slices into series
We use signature in self.is_same_series(other).
Returns : | signature : dict
|
---|
A number that is higher for higher slices in Z
Comparing this number between two adjacent slices should give a difference equal to the voxel size in Z.
See doc/theory/dicom_orientation for description
voxel sizes for array as returned by get_data()