You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Single frame images report every source image as missing from the referenced series #536
so ref_uid is a one-element tuple. The check that follows, if ref_uid not in all_referenced_sops, compares that tuple with UID strings and is always true. Every source image of a single frame image therefore lands in _missing_reference_instances, and get_source_image_uids() logs the "error with the integrity of the object" warning for it even when the instance is listed in the Referenced Series Sequence. The tuple also goes into the frame reference row in place of the UID.
Reproduction:
importpydicomimporthighdicomashdfrompydicom.dataimportget_testdata_filect=pydicom.dcmread(get_testdata_file('CT_small.dcm'))
src=pydicom.Dataset()
src.ReferencedSOPClassUID=ct.SOPClassUIDsrc.ReferencedSOPInstanceUID='1.2.3.4'ct.SourceImageSequence= [src]
ref=pydicom.Dataset()
ref.ReferencedSOPClassUID=ct.SOPClassUIDref.ReferencedSOPInstanceUID='1.2.3.4'series=pydicom.Dataset()
series.SeriesInstanceUID='1.2.3'series.ReferencedInstanceSequence= [ref]
ct.ReferencedSeriesSequence= [series]
im=hd.Image.from_dataset(ct)
print(im.get_source_image_uids())
# WARNING: SOP instances ('1.2.3.4',) referenced in the source image sequence is not included in ...
The returned list is right, since it is built from the referenced instance table; the warning and the missing list are wrong. The multiframe path (_build_luts_multiframe) does not have the comma. A PR with the fix and a test follows.
Activity