qurit / rt-utils

A minimal Python library to facilitate the creation and manipulation of DICOM RTStructs.
MIT License
181 stars 56 forks source link

RT-Struct does not always align with the original CT Scan #114

Open Joshua-Roche opened 1 month ago

Joshua-Roche commented 1 month ago

I have a deep learning model that segments a DICOM-formatted CT scan. The segmentation is saved out as a numpy array. When I try to convert this array to an RT-Struct, providing the folder that the CT scan lies in and the numpy array and overlay this RTStruct in DICOM-Viewing Software, the segmentation is not in the correct place, but offset ~120 slices (this offset number changes for every scan).

I've had real trouble with these CT scans.

Josh

Joshua-Roche commented 1 month ago

https://drive.google.com/file/d/11tjykVlO7W7enve5Q-ADJ3ylP0QL934p/view?usp=sharing

Link to a scan where the segmentation is offset. The numpy array itself aligns perfectly with the scans i.e. overlaying the numpy array directly on the pixel_array in python presents the correct segmentation for each slice.