You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on conversion of images to dicom using pydicom, which is successful. However, when I create a segmentation for it, it is getting saved but I'm seeing a ZeroDivisionError error while trying to read it back using:
dcm = pydicom.dcmread(lung_seg_file)
reader = pydicom_seg.MultiClassReader()
result = reader.read(dcm)
In the above line 3, I get the ZeroDivisionError error.
I see that the values for SliceThickness and Spacing Between Slices shows "0.0".
However, while converting image to dicom, I'm ensuring that I add both the above parameters to the dicom before saving it.
I'm also able to confirm the same while printing out those parameters of my dicom on a terminal.
Can anyone help me out with this issue? I'm not sure why it has to show 0.0 and then give the ZeroDivisionError error while reading.
The text was updated successfully, but these errors were encountered:
So you are converting segmentation images into DICOM and want to read it with pydicom-seg, right? Are you actually creating a DICOM-SEG document oder is it just a regular DICOM document? The latter would not work with pydicom-seg and you would be able to load the stored image with pydicom. A full traceback would also be helpful to understand which part of the code causes the ZeroDivisionError.
Hi!
I am working on conversion of images to dicom using pydicom, which is successful. However, when I create a segmentation for it, it is getting saved but I'm seeing a
ZeroDivisionError
error while trying to read it back using:In the above line 3, I get the
ZeroDivisionError
error.I see that the values for
SliceThickness
andSpacing Between Slices
shows "0.0".However, while converting image to dicom, I'm ensuring that I add both the above parameters to the dicom before saving it.
I'm also able to confirm the same while printing out those parameters of my dicom on a terminal.
Can anyone help me out with this issue? I'm not sure why it has to show 0.0 and then give the
ZeroDivisionError
error while reading.The text was updated successfully, but these errors were encountered: