dicom_utils package#

Module contents#

Implements misc dicom util stuff.

dicom_utils.dicom_self_slice_direction(d)#

Get the dicom image’s own slice position in the slice direction.

dicom_utils.dicom_slice_direction(d, point)#

Get the slice direction coordinate of the point in the given dicom’s coordinates.

dicom_utils.get_3vect(vect)#

Take a vector of len(v)=4 and reduce it to 3 by dropping last coordinate.

dicom_utils.get_4vect(vect)#

Extend a vector of len(v) = 2 or 3 to len(v) = 4 by appending 1s.

dicom_utils.image_to_pixel(d)#

Get the transform that sends image coordinates to pixel coordinates.

dicom_utils.image_to_world(d)#

Get the transform that sends image coordinates to world coordinates.

dicom_utils.orientation(d)#

Read the given dicom’s image orientation.

dicom_utils.pixel_array(d)#

Read the given dicom’s image data.

dicom_utils.pixel_to_image(d)#

Get the transform that sends pixel coordinates to image coordinates.

dicom_utils.pixel_to_world(d)#

Get the transform that sends pixel coordinates to world coordinates.

dicom_utils.position(d)#

Read the given dicom’s image position.

dicom_utils.read_cine_dir(cine_dirname)#

Find all dicoms in the given dir and separate them by phase and slice location.

dicom_utils.resp(d)#

Read the respiratory signal from the given dicom.

dicom_utils.spacing(d)#

Read the given dicom’s voxel size.

dicom_utils.trigger_time(d)#

Read the trigger time from the given dicom.

dicom_utils.world_to_image(d)#

Get the transform that sends world coordinates to image coordinates.

dicom_utils.world_to_pixel(d)#

Get the transform that sends world coordinates to pixel coordinates.