From 277326fd335d135432297dce6e615d948140468f Mon Sep 17 00:00:00 2001 From: Tobias Rittig Date: Wed, 6 Dec 2017 11:59:59 +0100 Subject: [PATCH] #Fix data interface for quantizedDirections in `gridvolume` --- src/volume/gridvolume.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/volume/gridvolume.cpp b/src/volume/gridvolume.cpp index 088b00c8d..27651baec 100644 --- a/src/volume/gridvolume.cpp +++ b/src/volume/gridvolume.cpp @@ -261,9 +261,9 @@ class GridDataSource : public VolumeDataSource { break; case EQuantizedDirections: format = "qdir"; - if (m_channels != 3) + if (m_channels != 2) Log(EError, "Encountered an unsupported quantized direction " - "volume data file (%i channels, only 3 are supported)", + "volume data file (%i channels, only 2 are supported)", m_channels); break; default: @@ -579,7 +579,7 @@ class GridDataSource : public VolumeDataSource { bool supportsFloatLookups() const { return m_channels == 1; } bool supportsSpectrumLookups() const { return m_channels == 3; } - bool supportsVectorLookups() const { return m_channels == 3; } + bool supportsVectorLookups() const { return (m_volumeType == EFloat32 && m_channels == 3) || (m_volumeType == EQuantizedDirections && m_channels == 2); } Float getStepSize() const { return m_stepSize; } Float getMaximumFloatValue() const {