var windowWidth = 400 var windowCenter = 40 var lower = windowCenter - windowWidth / 2.0 var upper = windowCenter + windowWidth / 2.0 var ctVoiRange = { lower, upper } function setCtMappingRange(ww, wc) { windowWidth = ww windowCenter = wc lower = windowCenter - windowWidth / 2.0 upper = windowCenter + windowWidth / 2.0 } export default function setCtTransferFunctionForVolumeActor({ volumeActor }) { volumeActor .getProperty() .getRGBTransferFunction(0) .setMappingRange(lower, upper) } export { ctVoiRange, setCtMappingRange }