Thanks a lot @lassoan
I found the error after debugging the python code. In my Ultrasound DICOM images the PixelSpacingPrivateTag store the values as a list e.g. [0.17, 017, 017], while in TCIA data the PixelSpacingPrivateTag value is a single value e.g. 0.17. The code needs to be updated so it can consider both list and single value otherwise float () throw the error.
This was the fix that I made in the current plugin, not a very fancy way as the return of ds[pixelSpacingPrivateTag].value is sometimes object:
try:
pixelSpacingPrivate = float(ds[pixelSpacingPrivateTag].value)
except:
pixelSpacingPrivate = ds[pixelSpacingPrivateTag].value
pixelSpacingPrivate = float(pixelSpacingPrivate[0])
I am almost there, this fix nicely solved my issue with TCIA data and STL files alignment (the one that I had problem with centering the volumes). I can’t understand why the vendors don’t follow the same standards for DICOM header, that could save alot of time.
Just one last small problem still here. My local data has gland segmentation as vtk file. If you look at the screenshot it looks like the axial/coronal/sagittal views for vtk model miss-placed. The vtk file generated originally based on the same Ultrasound volumes. Do you have any suggestion on how to correct this issue. I checked the RAS and LPS version when I load vtks but none of them correct the issue.
As I said, this problem is not exist anymore with TCIA data and they are nicely aligned.
