/// <summary> /// Updates the given VTK color transfer function with the current composed LUT data. /// </summary> /// <param name="tfColor"></param> public void UpdateTransferFunction(vtkColorTransferFunction tfColor) { if (_disposed) { throw new ObjectDisposedException("The transfer function composer has already been disposed!"); } Recalculate(); // N.B.: BuildFunctionFromTable builds the transfer function from the given array, but does not keep pointer to array! var outputLut = GetOutputLut(); tfColor.SetRange(outputLut.MinInputValue, outputLut.MaxInputValue); tfColor.BuildFunctionFromTable(outputLut.MinInputValue, outputLut.MaxInputValue, _vtkData.Length / 3, _vtkData); }
/// <summary> /// Updates the given VTK color transfer function with the current composed LUT data. /// </summary> /// <param name="tfColor"></param> public void UpdateTransferFunction(vtkColorTransferFunction tfColor) { if (_disposed) throw new ObjectDisposedException("The transfer function composer has already been disposed!"); Recalculate(); // N.B.: BuildFunctionFromTable builds the transfer function from the given array, but does not keep pointer to array! var outputLut = GetOutputLut(); tfColor.SetRange(outputLut.MinInputValue, outputLut.MaxInputValue); tfColor.BuildFunctionFromTable(outputLut.MinInputValue, outputLut.MaxInputValue, _vtkData.Length/3, _vtkData); }