private void SetColorTransferFunction() { _colorTransferFunction.RemoveAllPoints(); double R = _volumeLayer.TissueSettings.MinimumColor.R / 255.0f; double G = _volumeLayer.TissueSettings.MinimumColor.G / 255.0f; double B = _volumeLayer.TissueSettings.MinimumColor.B / 255.0f; _colorTransferFunction.AddRGBPoint(_volumeLayer.GetWindowLeft(), R, G, B); R = _volumeLayer.TissueSettings.MaximumColor.R / 255.0f; G = _volumeLayer.TissueSettings.MaximumColor.G / 255.0f; B = _volumeLayer.TissueSettings.MaximumColor.B / 255.0f; _colorTransferFunction.AddRGBPoint(_volumeLayer.GetWindowRight(), R, G, B); }