Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions monai/deploy/operators/dicom_seg_writer_operator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2025 MONAI Consortium
# Copyright 2021-2026 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -382,7 +382,7 @@ def create_dicom_seg(self, image: np.ndarray, dicom_series: DICOMSeries, output_
seg_purpose_of_reference_code = Dataset()
seg_purpose_of_reference_code.CodeValue = "Newcode1"
seg_purpose_of_reference_code.CodingSchemeDesignator = "99IHE"
seg_purpose_of_reference_code.CodeMeaning = '"Processing Algorithm'
seg_purpose_of_reference_code.CodeMeaning = "Processing Algorithm"
seq_purpose_of_reference_code.append(seg_purpose_of_reference_code)

seq_contributing_equipment = PyDicomSequence()
Expand Down
7 changes: 6 additions & 1 deletion monai/deploy/operators/dicom_text_sr_writer_operator.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2021-2022 MONAI Consortium
# Copyright 2021-2026 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -96,6 +96,7 @@ def __init__(
# "SR" for Structured Report.
# Media Storage SOP Class UID, e.g.,
# "1.2.840.10008.5.1.4.1.1.88.11" for Basic Text SR Storage
# "1.2.840.10008.5.1.4.1.1.88.22" for Enhanced SR
# "1.2.840.10008.5.1.4.1.1.104.1" for Encapsulated PDF Storage,
# "1.2.840.10008.5.1.4.1.1.88.34" for Comprehensive 3D SR IOD
# "1.2.840.10008.5.1.4.1.1.66.4" for Segmentation Storage
Expand Down Expand Up @@ -192,8 +193,12 @@ def write(self, content_text, dicom_series: Optional[DICOMSeries], output_dir: P
)

# SR specific
ds.CompletionFlag = "COMPLETE" # Estimated degree of completeness.
ds.VerificationFlag = "UNVERIFIED" # Not attested by a legally accountable person.

ds.ReferencedPerformedProcedureStepSequence = Sequence([]) # Required by SR Document Series
ds.PerformedProcedureCodeSequence = Sequence([]) # Required by SR Document General

# Per recommendation of IHE Radiology Technical Framework Supplement
# AI Results (AIR) Rev1.1 - Trial Implementation
# Specifically for Qualitative Findings,
Expand Down
8 changes: 4 additions & 4 deletions monai/deploy/operators/dicom_utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2022 MONAI Consortium
# Copyright 2022-2026 MONAI Consortium
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
Expand Down Expand Up @@ -198,8 +198,8 @@

# File meta info data set
file_meta = Dataset()
file_meta.FileMetaInformationGroupLength = 198
file_meta.FileMetaInformationVersion = bytes("01", "utf-8") # '\x00\x01'
# file_meta.FileMetaInformationGroupLength = 198

Check warning on line 201 in monai/deploy/operators/dicom_utils.py

View check run for this annotation

SonarQubeCloud / SonarCloud Code Analysis

Remove this commented out code.

See more on https://sonarcloud.io/project/issues?id=Project-MONAI_monai-deploy-app-sdk&issues=AZ6p8Kwh58x8k7pgrJev&open=AZ6p8Kwh58x8k7pgrJev&pullRequest=578
file_meta.FileMetaInformationVersion = b"\x00\x01" # '\x00\x01'

file_meta.MediaStorageSOPClassUID = sop_class_uid
file_meta.MediaStorageSOPInstanceUID = my_sop_instance_uid
Expand Down Expand Up @@ -282,7 +282,7 @@
ds_purpose_of_reference_code = Dataset()
ds_purpose_of_reference_code.CodeValue = "Newcode1"
ds_purpose_of_reference_code.CodingSchemeDesignator = "99IHE"
ds_purpose_of_reference_code.CodeMeaning = '"Processing Algorithm'
ds_purpose_of_reference_code.CodeMeaning = "Processing Algorithm"
seq_purpose_of_reference_code.append(ds_purpose_of_reference_code)

seq_contributing_equipment = Sequence()
Expand Down
Loading