Note
Go to the end to download the full example code. or to run this example in your browser via Binder
Maximum intensity projection#
Creating a maximum intensity projection of an image volume.
import numpy as np
import dbdicom as db
from dbdicom.extensions.numpy import maximum_intensity_projection
Create some test data, in this case a zero-filled array, describing 8 MRI images each measured at 3 flip angles and 2 repetition times:
Create a maximum intensity projection
mip = maximum_intensity_projection(series, dims=tuple(coords), axis=0)
To see what happened we can retrieve the nympy array of the MIP
array = mip.pixel_values(dims=('SliceLocation', 'ImageNumber'))
print(array.shape)
# sphinx_gallery_thumbnail_path = '_static/dbd.png'