Correct the MONAI models' error in OrientationD pre-processing transforms from "RAS" to "LPS"#559
Merged
Merged
Conversation
Signed-off-by: M Q <mingmelvinq@nvidia.com>
|
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR corrects orientation transform parameters in MONAI-based medical imaging models to resolve compatibility issues with MONAI v1.5.1. The change addresses preprocessing errors that occurred after MONAI updated how image space metadata is parsed for DICOM CT images.
- Updates OrientationD transform parameter from "RAS" to "LPS" across multiple operators
- Fixes preprocessing pipeline compatibility with MONAI v1.5.1's improved space metadata parsing
- Ensures consistent image orientation handling for DICOM images that are loaded with LPS space metadata
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| platforms/nuance_pin/app/inference.py | Updated OrientationD axcodes parameter in preprocessing pipeline |
| examples/apps/cchmc_ped_abd_ct_seg_app/abdomen_seg_operator.py | Updated OrientationD axcodes parameter for pediatric abdomen segmentation |
| examples/apps/ai_unetr_seg_app/unetr_seg_operator.py | Updated OrientationD axcodes parameter for UNETR segmentation |
| examples/apps/ai_remote_infer_app/spleen_seg_operator.py | Updated OrientationD axcodes parameter for spleen segmentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
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.



See detailed description in issue #557 .
The OrientationD in the Pre-processing transforms of the MONAI models that were trained with flipped DICOM CT images from Medical Decathlon contains error to transform the loaded DICOM images in LPS to RAS. Now, after the fix in monai v1.5.1 where input image's
spacemetadata is properly parsed (MD App SDK sets it for loaded DICOM image as "LPS", but notlabels) and affects the transform toRAStake effects, adverse that is, because before the imagelabelsdefaults toRASandspacenot parsed.Pull Request Overview
This PR corrects orientation transform parameters in MONAI-based medical imaging models to resolve compatibility issues with MONAI v1.5.1. The change addresses preprocessing errors that occurred after MONAI updated how image space metadata is parsed for DICOM CT images.
Verification and Validation
The updated Jupyter notebook in the pull request was used to test the updates with input DICOM CT Series downloaded from TCIA.