/// <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(); }
private void OnLutChanged() { // clear the LUT pipeline so that it will be reassembled if (_lutCollection != null) { _lutCollection.Clear(); _lutCollection = null; } SyncMinMaxValues(); _recalculate = true; }