voxel.utils.pixel_data.pixel_dtype

voxel.utils.pixel_data.pixel_dtype(ds: Dataset) dtype[source]

Detect the NumPy dtype of the data in a header. NB: byteorder can be incorrect, so use with caution (see pydicom pixel_dtype docs).

Parameters:

ds (pydicom.Dataset) – DICOM header.

Returns:

NumPy dtype of the data.

Return type:

np.dtype