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); } }
/// <summary> /// Cloning constructor. /// </summary> /// <param name="source">The source object from which to clone.</param> /// <param name="context">The cloning context object.</param> private InvertedLinearLut(InvertedLinearLut source, ICloningContext context) { _rescaleSlope = source._rescaleSlope; _rescaleIntercept = source._rescaleIntercept; }
/// <summary> /// Cloning constructor. /// </summary> /// <param name="source">The source object from which to clone.</param> /// <param name="context">The cloning context object.</param> private InvertedLinearLut(InvertedLinearLut source, ICloningContext context) { _rescaleSlope = source._rescaleSlope; _rescaleIntercept = source._rescaleIntercept; }