qurit / rt-utils

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

Apply limit to decimal places of ContourData DICOM item #80

Open tomaroberts opened 1 year ago

tomaroberts commented 1 year ago

Hi there,

Really nice package – great work.

I've been using rt-utils recently to create some RT Struct DICOM files which we would like to open in the Eclipse software platform. The RT Struct writer works and I get the DICOM files, however, when we import them into Eclipse, the logs state that the byte limit on the ContourData DICOM item has been exceeded.

According to the DICOM standard, there is a 16 byte maximum size for DS items (see here for screenshot from NEMA website).

Would it be possible to amend rt-utils so that it caps the number of decimal places on the item?

Edit – realised I was being silly: PR here.

Many thanks.

tomaroberts commented 1 year ago

@asim-shrestha

Would you be able to do new PyPI release with the latest changes? It would save me hacking a workaround to get the latest version that's on main branch.

I've tried installing rt-utils via pip and calling the latest Git commit directly, e.g. pip install -e git+https://github.com/qurit/rt-utils@769acd6#egg=rt-utils and also pip install -e git+https://github.com/qurit/rt-utils@main#egg=rt-utils, plus other variations on this... however, whenever I open a Python prompt and type import rt_utils it says ModuleNotFoundError in each case. My hunch is that it's something to do with the setup.py, but rather than spend ages debugging here, would be great to get new PyPI release! 🙏