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

This commit is contained in:
Erik Ziegler authored and GitHub committed 2019-09-19 14:39:36 +02:00
1 parent 45aeaec916
commit 2341b32638
1 file changed
+5
+5
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 *