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));
            }
        }
            public FusionOverlayImageGraphic(FusionOverlayFrameData fusionOverlayFrameData)
                : base(fusionOverlayFrameData._overlayFrameParams.Rows, fusionOverlayFrameData._overlayFrameParams.Columns,
                       fusionOverlayFrameData._overlayFrameParams.BitsAllocated, fusionOverlayFrameData._overlayFrameParams.BitsStored, fusionOverlayFrameData._overlayFrameParams.HighBit,
                       fusionOverlayFrameData._overlayFrameParams.IsSigned, fusionOverlayFrameData._overlayFrameParams.IsInverted,
                       fusionOverlayFrameData._overlayFrameParams.RescaleSlope, fusionOverlayFrameData._overlayFrameParams.RescaleIntercept,
                       fusionOverlayFrameData.GetPixelData)
            {
                // this image graphic needs to keep a transient reference on the slice, otherwise it could get disposed before we do!
                _overlayFrameData = fusionOverlayFrameData.CreateTransientReference();

                if (fusionOverlayFrameData.OverlayData.Modality == @"PT" && RescaleSlope < 1.0 / (1 << BitsStored))
                {
                    // some PET images have such a small slope that all stored pixel values map to one single value post-modality LUT
                    // we detect this condition here and apply the inverse of the modality LUT as a normalization function for VOI purposes
                    // http://groups.google.com/group/comp.protocols.dicom/browse_thread/thread/8930b159cb2a8e73?pli=1
                    NormalizationLut = new InvertedLinearLut(RescaleSlope, RescaleIntercept);
                }
            }
 public IFusionOverlayFrameDataReference Clone()
 {
     return(_frameData.CreateTransientReference());
 }
Beispiel #4
0
 public FusionPresentationImage(Frame baseFrame, FusionOverlayFrameData overlayData)
     : this(baseFrame.CreateTransientReference(), overlayData.CreateTransientReference())
 {
 }