private void Initialize() { if (base.ImageGraphic.VoiLutFactory == null) { base.ImageGraphic.VoiLutFactory = GraphicVoiLutFactory.Create(GetInitialVoiLut); } if (_dicomGraphics == null) { _dicomGraphics = new CompositeGraphic(); _dicomGraphics.Name = "DICOM"; // insert the DICOM graphics layer right after the image graphic (both contain domain-level graphics) IGraphic imageGraphic = CollectionUtils.SelectFirst(base.CompositeImageGraphic.Graphics, g => g is ImageGraphic); base.CompositeImageGraphic.Graphics.Insert(base.CompositeImageGraphic.Graphics.IndexOf(imageGraphic) + 1, _dicomGraphics); } }
private void Initialize() { base.VoiLutsEnabled = DicomPresentationImageSettings.Default.AllowWindowingOnColorImages; if (base.ImageGraphic.VoiLutFactory == null) { base.ImageGraphic.VoiLutFactory = GraphicVoiLutFactory.Create( graphic => InitialVoiLutProvider.Instance.GetLut(graphic.ParentPresentationImage)); } if (_dicomGraphics == null) { _dicomGraphics = new CompositeGraphic(); _dicomGraphics.Name = "DICOM"; // insert the DICOM graphics layer right after the image graphic (both contain domain-level graphics) IGraphic imageGraphic = CollectionUtils.SelectFirst(base.CompositeImageGraphic.Graphics, g => g is ImageGraphic); base.CompositeImageGraphic.Graphics.Insert(base.CompositeImageGraphic.Graphics.IndexOf(imageGraphic) + 1, _dicomGraphics); } }