/// <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)); } }
public override string ToString() { return(_sourceLut.GetKey()); }