-
Notifications
You must be signed in to change notification settings - Fork 15
feat: ED-1855 Dicom and Nifti Space #1056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @clinton-encord, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces significant enhancements to the platform's data handling capabilities by integrating comprehensive support for medical imaging data, specifically DICOM and NIfTI formats. This was achieved by generalizing the existing VideoSpace into a new MultiFrameSpace base class, which now serves as the foundation for all frame-based data types. Building upon this, two specialized classes, MedicalFileSpace and MedicalStackSpace, were implemented to cater to the unique requirements of single-file and multi-file medical datasets, respectively. These changes ensure robust and scalable management of medical annotations. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Unit test report (Python 3.9.24, Pydantic 2.12.3)480 tests 480 ✅ 12s ⏱️ Results for commit 0f39a19. ♻️ This comment has been updated with latest results. |
Unit test report (Python 3.9.24, Pydantic 1.10.22)480 tests 480 ✅ 12s ⏱️ Results for commit 0f39a19. ♻️ This comment has been updated with latest results. |
| def __init__(self, space_id: str, label_row: LabelRowV2, frames: List[DicomFrameInfo]): | ||
| super().__init__(space_id, label_row, number_of_frames=len(frames), height=0, width=0) | ||
| self._frames = frames | ||
|
|
||
| def _to_space_dict(self) -> MedicalStackSpaceInfo: | ||
| """Export space to dictionary format.""" | ||
| labels: dict[str, LabelBlob] = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could also override the put_object_instance, remove_object_instance_from_frames, put_classification_instance, remove_classification_instance_from_frames, to also take in the instance_uuid or file_name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces support for DICOM and NIfTI files by refactoring VideoSpace into a more generic MultiFrameSpace and adding MedicalFileSpace and MedicalStackSpace. The changes are well-structured and include corresponding updates to enums, type definitions, and tests. My review focuses on a critical dependency issue where production code imports from test code, a potential bug in MedicalStackSpace initialization, and an opportunity to reduce code duplication for better maintainability. Overall, the changes are a great step forward, and addressing the identified issues will further improve the code quality.
SDK integration test report 1 files ±0 1 suites ±0 15m 51s ⏱️ +27s For more details on these failures and errors, see this check. Results for commit 0f39a19. ± Comparison against base commit 5368243. ♻️ This comment has been updated with latest results. |
| uri: str | ||
|
|
||
|
|
||
| class SceneImageSpaceInfo(BaseSpaceInfo): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That one shouldn't be needed yet right?
Introduction and Explanation
MultiFrameSpaceMedicalFileSpace(for Single file DICOMs and NIfTI)MedicalStackSpace(for Multi-file DICOMs)JIRA
Link ticket(s)
Documentation
There should be enough internal documentation for a product owner to write customer-facing documentation or a separate PR linked if writing the customer documentation directly. Link all that are relevant below.
Tests
Make a quick statement and post any relevant links of CI / test results. If the testing infrastructure isn’t yet in-place, note that instead.
Known issues
If there are any known issues with the solution, make a statement about what they are and why they are Ok to leave unsolved for now. Make tickets for the known issues linked to the original ticket linked above