To find the refence source image id now we do:
1) we filter out source series with the segmentation ReferencedSeriesSequence.SeriesInstanceUID
2) we filter out source instances with the segmentation FrameOfReferenceUID
3) we filter out source instances with the segmentation PerFrameFunctionalGroup.PlanePositionSequence.ImagePositionPatient (within a tolerance)
If a source instance is not found for the segmentation frame, we do a last try using simply the segmentation frame ReferencedSOPInstanceUID
Improve find logic for segmentations reference source image Ids as discussed in https://github.com/OHIF/Viewers/issues/2733.
To find the refence source image id now we do: 1) we filter out source series with the segmentation ReferencedSeriesSequence.SeriesInstanceUID 2) we filter out source instances with the segmentation FrameOfReferenceUID 3) we filter out source instances with the segmentation PerFrameFunctionalGroup.PlanePositionSequence.ImagePositionPatient (within a tolerance)
If a source instance is not found for the segmentation frame, we do a last try using simply the segmentation frame ReferencedSOPInstanceUID