import vtkColorTransferFunction from '@kitware/vtk.js/Rendering/Core/ColorTransferFunction';
export default function createLinearRGBTransferFunction(voiRange) {
    const cfun = vtkColorTransferFunction.newInstance();
    let lower = 0;
    let upper = 1024;
    if (voiRange.lower !== undefined && voiRange.upper !== undefined) {
        lower = voiRange.lower;
        upper = voiRange.upper;
    }
    cfun.addRGBPoint(lower, 0.0, 0.0, 0.0);
    cfun.addRGBPoint(upper, 1.0, 1.0, 1.0);
    return cfun;
}
