コード例 #1
0
ファイル: LUTComposer.cs プロジェクト: shihao80/ClearCanvas
        /// <summary>
        /// Sets the <see cref="IComposableLut"/> field and sets up the LutChanged event handler.
        /// </summary>
        private void SetLutField <T>(ref T field, T value)
            where T : class, IComposableLut
        {
            if (Equals(field, value))
            {
                return;
            }

            if (field != null)
            {
                field.LutChanged -= OnLutValuesChanged;
            }

            field = value;

            if (field != null)
            {
                field.LutChanged += OnLutValuesChanged;
            }

            // clear the LUT pipeline so that it will be reassembled
            if (_lutCollection != null)
            {
                _lutCollection.Clear();
                _lutCollection = null;
            }

            OnLutChanged();
        }
コード例 #2
0
ファイル: LUTComposer.cs プロジェクト: hksonngan/Xian
        private void OnLutChanged()
        {
            // clear the LUT pipeline so that it will be reassembled
            if (_lutCollection != null)
            {
                _lutCollection.Clear();
                _lutCollection = null;
            }

            SyncMinMaxValues();
            _recalculate = true;
        }