Compare commits

..

2 Commits

Author SHA1 Message Date
caiyiling c63811d55c Merge branch 'main' of https://gitea.frp.extimaging.com/XCKJ/irc_web into main
continuous-integration/drone/push Build is passing Details
2026-03-30 15:45:52 +08:00
caiyiling 832fa82d4b 融合伪彩更改 2026-03-30 15:45:16 +08:00
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);
}