融合伪彩更改

uat_us
caiyiling 2026-03-30 15:45:16 +08:00
parent 0dbd74270d
commit 832fa82d4b
1 changed files with 1 additions and 8 deletions

View File

@ -32,15 +32,8 @@ export default function setPetColorMapTransferFunctionForVolumeActor({
cfun.applyColorMap(presetToUse);
const center = getWindowCenterFromVolumeId(volumeId);
const upper = Number.isFinite(center) && center > 1 ? center : 5;
const upper = center > 1 ? center : 5;
cfun.setMappingRange(1, upper);
volumeActor.getProperty().setRGBTransferFunction(0, cfun);
const ofun = vtkPiecewiseFunction.newInstance();
const rampX = Number.isFinite(upper) && upper > 0 ? Math.min(0.1, upper * 0.02) : 0.1;
ofun.addPoint(0, 0.0);
ofun.addPoint(rampX, 0.9);
ofun.addPoint(upper, 1.0);
volumeActor.getProperty().setScalarOpacity(0, ofun);
}