Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix slice spacing computation in pydicom_series.py #22

Open
jond01 opened this issue May 3, 2021 · 0 comments
Open

Fix slice spacing computation in pydicom_series.py #22

jond01 opened this issue May 3, 2021 · 0 comments

Comments

@jond01
Copy link
Contributor

jond01 commented May 3, 2021

The calculated distance_sum takes care only of ImagePositionPatient:

# Finish calculating average distance
# (Note that there are len(L)-1 distances)
distance_mean = distance_sum / (len(L) - 1)
# Store information that is specific for the serie
self._shape = [len(L), ds2.Rows, ds2.Columns]
self._sampling = [distance_mean, float(ds2.PixelSpacing[0]),
float(ds2.PixelSpacing[1])]

However, to compute the slice spacing one also has to take care of ImageOrientationPatient, see dicom_numpy's implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant