📅  最后修改于: 2022-03-11 14:45:29.110000             🧑  作者: Mango
#cosines are stored under the image orientation tag
#ipp are stored under the image position tag
cosines = get_image_orientation(slices[0])
normal = np.cross(cosines[:3], cosines[3:])
distances = []
for slice_ in slices:
ipp = get_image_position(slice)
dist = np.sum(normal*ipp)
distances.append(dist)
dist_arr = np.array(distances)
dist_arr_sorted = np.sort(dist_arr)
dist_between_slices = np.ediff1d(dist_arr_sorted)