示例#1
0
            /// <summary>
            /// Factory method for linear modality luts.
            /// </summary>
            public override IModalityLut GetModalityLutLinear(int bitsStored, bool isSigned, double rescaleSlope, double rescaleIntercept)
            {
                ModalityLutLinear modalityLut = new ModalityLutLinear(bitsStored, isSigned, rescaleSlope, rescaleIntercept);
                string            key         = modalityLut.GetKey();

                lock (_syncLock)
                {
                    if (_modalityLutCache.ContainsKey(key))
                    {
                        return(new CachedModalityLutProxy(_modalityLutCache[key]));
                    }

                    ModalityLutCacheItem item = new ModalityLutCacheItem(modalityLut);
                    _modalityLutCache[key] = item;
                    return(new CachedModalityLutProxy(item));
                }
            }
示例#2
0
 public override string ToString()
 {
     return(_sourceLut.GetKey());
 }