Hi, I am working with MR DICOM files and RT Structure.
I want to see DICOM and RT Structure in Python.
I’m trying to implement pydicom, not the Slicer module, but the value of Image Orientation Patient in MR data that I have is not (1,0,0,0,1,0), have (0.99, -0.04,0.01,0.043,0.99, -0.01) .
The following formula is used to convert RT Structure points from 3D to 2D.
DICOM RT structure set import/export is already implemented in SlicerRT extension.
No need to reimplement this in Python, since everything is already available in Python (the C++ classes are Python-wrapped). In fact, the DICOM import plugin infrastructure is implemented in Python.
If an RTSTRUCT importer that does all the sophisticated and robust processing as SlicerRT (preserves original contour points but interpolates between them smoothly, while supporting keyholes, branching, and provides smooth end-capping) was implemented in Python natively, it would be probably way too slow anyway.