-
Notifications
You must be signed in to change notification settings - Fork 420
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
TypeError: can only concatenate list (not "MultiValue") to list #72
Comments
thank you ~
2018-03-13 12:05 GMT+08:00 Michael E. Palmer <notifications@github.com>:
… If anyone is using pydicom=1.0.2 instead of the older pydicom=0.9.9, you
will get an exception during the preprocessing step:
TypeError: can only concatenate list (not "MultiValue") to list
The exception is raised at line 50 of preprocessing/step1.py. You can fix
it by replacing the original version of line 50:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness]
+ slices[0].PixelSpacing, dtype=np.float32)
with this version:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness,
slices[0].PixelSpacing[0], slices[0].PixelSpacing[1]], dtype=np.float32)
(The second version of line 50 works with either version of pydicom.)
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#72>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AIigQ1TEbHVlXhsySPU3nSEA_V2CQynHks5td0WMgaJpZM4SoDSa>
.
--
廖方舟
清华大学医学院
Liao Fangzhou
School of Medicine
Tsinghua University
Beijing 100084
China
|
thank you very much |
Hey mepster, in which file can I replace the original version of line 50? |
thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If anyone is using pydicom=1.0.2 instead of the older pydicom=0.9.9, you will get an exception during the preprocessing step:
TypeError: can only concatenate list (not "MultiValue") to list
The exception is raised at line 50 of preprocessing/step1.py. You can fix it by replacing the original version of line 50:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness] + slices[0].PixelSpacing, dtype=np.float32)
with this version:
return np.array(image, dtype=np.int16), np.array([slices[0].SliceThickness, slices[0].PixelSpacing[0], slices[0].PixelSpacing[1]], dtype=np.float32)
(The second version of line 50 works with either version of pydicom.)
The text was updated successfully, but these errors were encountered: