/// <summary> /// Creates a <see cref="ImageSopInstanceReferenceMacro"/> to the given <see cref="Frame"/>. /// </summary> /// <param name="frame">The image SOP frame to which a reference is to be constructed.</param> /// <returns>An image SOP instance reference macro item.</returns> protected static ImageSopInstanceReferenceMacro CreateImageSopInstanceReference(Frame frame) { ImageSopInstanceReferenceMacro imageReference = new ImageSopInstanceReferenceMacro(); imageReference.ReferencedSopClassUid = frame.ParentImageSop.SopClassUid; imageReference.ReferencedSopInstanceUid = frame.SopInstanceUid; imageReference.ReferencedFrameNumber.SetInt32(0, frame.FrameNumber); return imageReference; }
/// <summary> /// Creates a single instance of a SourceImageSequence item. Does not modify the SourceImageSequence in the underlying collection. /// </summary> public ImageSopInstanceReferenceMacro CreateSourceImageSequenceItem() { var iodBase = new ImageSopInstanceReferenceMacro(new DicomSequenceItem()); return iodBase; }
/// <summary> /// Creates a <see cref="ImageSopInstanceReferenceMacro"/> to the given <see cref="ImageSop"/>. /// </summary> /// <param name="sop">The image SOP to which a reference is to be constructed.</param> /// <returns>An image SOP instance reference macro item.</returns> protected static ImageSopInstanceReferenceMacro CreateImageSopInstanceReference(ImageSop sop) { ImageSopInstanceReferenceMacro imageReference = new ImageSopInstanceReferenceMacro(); imageReference.ReferencedSopClassUid = sop.SopClassUid; imageReference.ReferencedSopInstanceUid = sop.SopInstanceUid; return imageReference; }