Skip to content

Commit

Permalink
finalized selected series logs added
Browse files Browse the repository at this point in the history
Signed-off-by: bluna301 <luna.bryanr@gmail.com>
  • Loading branch information
bluna301 committed Dec 3, 2024
1 parent 5d211f4 commit 49fa70a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions monai/deploy/operators/dicom_series_selector_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,20 @@ def compute(self, op_input, op_output, context):
study_selected_series = self.filter(
selection_rules, dicom_study_list, self._all_matched, self._sort_by_sop_instance_count
)

# log Series Description and Series Instance UID of the first selected DICOM Series (i.e. the one to be used for inference)
if study_selected_series and len(study_selected_series) > 0:
inference_study = study_selected_series[0]
if inference_study.selected_series and len(inference_study.selected_series) > 0:
inference_series = inference_study.selected_series[0].series
logging.info("Series Selection finalized.")
logging.info(
f"Series Description of selected DICOM Series for inference: {inference_series.SeriesDescription}"
)
logging.info(
f"Series Instance UID of selected DICOM Series for inference: {inference_series.SeriesInstanceUID}"
)

op_output.emit(study_selected_series, self.output_name_selected_series)

def filter(
Expand Down

0 comments on commit 49fa70a

Please sign in to comment.