Matching segmentation with the input data

To clarify the question the modality used is DICOM SEG, see related topic Saving segmentation as DICOM - #5 by WojtekL.

I do not have experience with the internals of DICOM SEG export, so I defer to those who have.