public FusionOverlayCompositeGraphic(FusionOverlayFrameData overlayFrameData)
        {
            _overlayFrameDataReference = overlayFrameData.CreateTransientReference();
            _overlayFrameDataReference.FusionOverlayFrameData.Unloaded += HandleOverlayFrameDataUnloaded;
            _voiLutManagerProxy   = new VoiLutManagerProxy();
            _colorMapManagerProxy = new ColorMapManagerProxy();

            // install an initial VOI window if one is available in the overlay headers
            var initialVoiWindow = CollectionUtils.FirstElement(overlayFrameData.OverlayData.VoiWindows);

            if (initialVoiWindow != null)
            {
                VoiLutManager.InstallVoiLut(new BasicVoiLutLinear(initialVoiWindow.Width, initialVoiWindow.Center));
            }
        }
        protected override void Dispose(bool disposing)
        {
            if (disposing)
            {
                _overlayImageGraphic  = null;
                _voiLutManagerProxy   = null;
                _colorMapManagerProxy = null;

                if (_overlayFrameDataReference != null)
                {
                    _overlayFrameDataReference.FusionOverlayFrameData.Unloaded -= HandleOverlayFrameDataUnloaded;
                    _overlayFrameDataReference.Dispose();
                    _overlayFrameDataReference = null;
                }
            }

            base.Dispose(disposing);
        }
        /// <summary>
        /// Cloning constructor.
        /// </summary>
        /// <param name="source">The source object from which to clone.</param>
        /// <param name="context">The cloning context object.</param>
        protected VoiLutManagerProxy(VoiLutManagerProxy source, ICloningContext context)
        {
            context.CloneFields(source, this);

            _placeholderVoiLutManager = new VoiLutManager(new XVoiLutInstaller(source._realVoiLutManager ?? source._placeholderVoiLutManager), false);
        }