protected virtual void OnSliceSetRemoved(IMprSliceSet item) { if (item is IInternalMprSliceSet) { ((IInternalMprSliceSet)item).Parent = null; } }
protected virtual void OnSliceSetAdded(IMprSliceSet item) { if (item is IInternalMprSliceSet) { ((IInternalMprSliceSet)item).Parent = this; } }
public MprDisplaySet(string name, IMprSliceSet sliceSet) : base(name, sliceSet.Uid) { _sliceSet = sliceSet; _sliceSet.SliceSopsChanged += sliceSet_SliceSopsChanged; FillPresentationImages(); }
protected override void Dispose(bool disposing) { if (disposing) { _sliceSet.SliceSopsChanged -= sliceSet_SliceSopsChanged; _sliceSet = null; } base.Dispose(disposing); }
/// <summary> /// Finds the ImageBox displaying the specified slice set /// </summary> protected static IImageBox FindImageBox(IMprSliceSet sliceSet, MprViewerComponent viewer) { if (sliceSet == null || viewer == null) { return(null); } foreach (IImageBox imageBox in viewer.PhysicalWorkspace.ImageBoxes) { if (imageBox.DisplaySet != null && imageBox.DisplaySet.Uid == sliceSet.Uid) { return(imageBox); } } return(null); }
protected virtual IDisplaySet CreateDisplaySet(int number, IMprSliceSet sliceSet) { string name; if (sliceSet is IMprStandardSliceSet && ((IMprStandardSliceSet)sliceSet).IsReadOnly) { name = string.Format(SR.FormatMprDisplaySetName, sliceSet.Description); } else { name = string.Format(SR.FormatMprDisplaySetName, number - 1); } DisplaySet displaySet = new MprDisplaySet(name, sliceSet); displaySet.Description = name; displaySet.Number = number; return(displaySet); }
protected virtual IDisplaySet CreateDisplaySet(int number, IMprSliceSet sliceSet) { string name; if (sliceSet is IMprStandardSliceSet && ((IMprStandardSliceSet)sliceSet).IsReadOnly) name = string.Format(SR.FormatMprDisplaySetName, sliceSet.Description); else name = string.Format(SR.FormatMprDisplaySetName, number - 1); DisplaySet displaySet = new MprDisplaySet(name, sliceSet); displaySet.Description = name; displaySet.Number = number; return displaySet; }
protected virtual void OnSliceSetAdded(IMprSliceSet item) { if (item is IInternalMprSliceSet) ((IInternalMprSliceSet)item).Parent = this; }
protected virtual void OnSliceSetRemoved(IMprSliceSet item) { if (item is IInternalMprSliceSet) ((IInternalMprSliceSet) item).Parent = null; }