dicompyler / dicompyler-core

A library of core radiation therapy modules for DICOM RT used by dicompyler
https://dicompyler-core.readthedocs.io
Other
146 stars 68 forks source link

Fix: Validate Z-Coordinate Uniformity in DICOM Contour Processing #378

Open SteEcker opened 6 months ago

SteEcker commented 6 months ago

This PR is related to #377

Changes:

Reason: Ensures DVH integrity by verifying z-coordinate uniformity within contours

pep8speaks commented 6 months ago

Hello @SteEcker! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers:

Comment last updated at 2024-03-14 13:37:17 UTC
bastula commented 6 months ago

Another suggestion: I think if we can write a test case with some dummy data to ensure we have code coverage that would make this PR fully complete. The test case can be included in the class TestRTStructureSet in similar method to test_structure_set_coordinates below:

https://github.com/dicompyler/dicompyler-core/blob/0ad6e71bdaf3cc76448b5dc78f8d29d1947a5f65/tests/test_dicomparser.py#L193-L204

It would probably best to create dummy structure data via the create_new_contour function in https://github.com/dicompyler/dicompyler-core/blob/0ad6e71bdaf3cc76448b5dc78f8d29d1947a5f65/tests/test_dvhcalc.py#L56