Skip to content

Add MR SOP class filter#86

Open
ChanceSauley wants to merge 1 commit into
BRAINSia:mainfrom
ChanceSauley:option-to-filter-mr-sop-class-uid
Open

Add MR SOP class filter#86
ChanceSauley wants to merge 1 commit into
BRAINSia:mainfrom
ChanceSauley:option-to-filter-mr-sop-class-uid

Conversation

@ChanceSauley
Copy link
Copy Markdown

@ChanceSauley ChanceSauley commented Apr 3, 2026

Overview

Add a boolean to optionally only process series with a valid MR SOP class.

This solves an uncommon but widespread issue where someone will scan a document to attach to a patient's study in their PACS. However, it is incorrectly marked as an MR modality and can be missing the series number DICOM tag. When processing that study directory, an error would be thrown on initialization of ProcessOneDicomStudyToVolumesMappingBase

Implementation

Added a optional argument to specify that only MR SOP classes are considered.

Testing

Previous Issue that is now fixed:

File /Users/csauley/dcm_classifier/study_processing.py", line 370, in __identify_single_volumes
    sn = int(volume_obj.get_dicom_field_by_name("SeriesNumber"))
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: invalid literal for int() with base 10: 'UNKNOWN_SeriesNumber'

Problems Faced

Notes

This could be implemented by default. However, I defaulted to False to preserve current functionality one to one for the initial review.

Add a boolean to optionally only process series with a valid MR SOP class.

This solves an uncommon but widespread issue where someone will scan a document to attach to a patient's study in their PACS.
However, it is incorrectly marked as a MR modality and can be missing the series number DICOM tag.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant