fix: Set transfer function range to data range when loading volumes in VTK (#930)

This commit is contained in:
Erik Ziegler 2019-09-19 14:39:36 +02:00 committed by GitHub
parent 45aeaec916
commit 2341b32638
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,6 +189,11 @@ class OHIFVTKViewport extends Component {
volumeActor.setMapper(volumeMapper);
volumeMapper.setInputData(data);
const range = data.getPointData().getScalars().getRange();
// TODO: For PET we might want to just set this to 0-5 SUV
volumeActor.getProperty().getRGBTransferFunction(0).setRange(range[0], range[1]);
// TODO: Should look into implementing autoAdjustSampleDistance in vtk
const sampleDistance =
1.2 *