Refactor DICOM tests and enhance hybrid mode functionality#17
Merged
Conversation
- Updated `test_scanDicom_integration.py` to remove unnecessary logger parameters in function calls. - Enhanced `test_synthetic_known_result.py` to improve clarity and structure, focusing on the DICOMfilter pipeline and its output validation. - Introduced new tests for hybrid mode in `test_toolbox_hybrid.py`, validating the correct execution and result ordering of the toolbox's hybrid processing functionality.
…ling of removed scans
…n rows in DICOM ordering
…andle slice count validation
… out empty entries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the DICOM preprocessing pipeline by improving how removed scans are tracked, checkpointed, and aggregated, as well as increasing robustness and memory efficiency. The main changes include more consistent handling of removed scan records, improved checkpointing for better resumability, and several bug fixes and code cleanups.
Improvements to removed scan tracking and aggregation:
removedrecords to always store lists of DataFrames, ensuring consistent tracking of all removed scans throughout filtering and splitting steps. This includes updating how removed scans are appended and aggregated in_filter_worker,_split_worker, and_aggregate_removed. [1] [2] [3] [4] [5]Checkpointing and resumability enhancements:
Robustness and bug fixes:
_relocate_worker, skipping and warning about invalid entries instead of failing.Interface and argument consistency:
02_parseDicom.pyfrom--batch-sizeand--min-free-gbto--batch_sizeand--min_free_gbfor consistency.00_preprocess.shto pass--save_dirand--load_tablearguments to the parsing script ifSAVE_DIRis set.General code cleanup and documentation:
These changes collectively make the preprocessing pipeline more reliable, easier to resume, and better at tracking all data modifications throughout the workflow.