diff --git a/modules/iswa/rendering/dataplane.cpp b/modules/iswa/rendering/dataplane.cpp index a68a7b7022..c7f339b0cb 100644 --- a/modules/iswa/rendering/dataplane.cpp +++ b/modules/iswa/rendering/dataplane.cpp @@ -79,7 +79,7 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary) loadTexture();}); _useLog.onChange([this](){loadTexture();}); _useHistogram.onChange([this](){loadTexture();}); - _dataOptions.onChange([this](){loadTexture();}); + _dataOptions.onChange([this](){ loadTexture();} ); _transferFunctionsFile.onChange([this](){ @@ -372,18 +372,18 @@ std::vector DataPlane::readData(){ return std::vector(); } - // // FOR TESTING - // // =========== + // FOR TESTING + // =========== // std::chrono::time_point start, end; // start = std::chrono::system_clock::now(); - // // =========== - + // =========== + for(int i=0; i elapsed_seconds = end-start; @@ -391,7 +391,7 @@ std::vector DataPlane::readData(){ // std::cout << " readData():" << std::endl; // std::cout << "avg elapsed time: " << _avgBenchmarkTime << "s\n"; // std::cout << "num Benchmarks: " << _numOfBenchmarks << "\n"; - // // =========== + // =========== return data; @@ -403,9 +403,8 @@ std::vector DataPlane::readData(){ } -void DataPlane::processData(std::vector outputData, int inputChannel, std::vector inputData, float min, float max,float sum){ +void DataPlane::processData(float* outputData, std::vector& inputData, float min, float max,float sum){ - float* output = outputData[inputChannel]; // HISTOGRAM // number of levels/bins/values const int levels = 512; @@ -497,7 +496,7 @@ void DataPlane::processData(std::vector outputData, int inputChannel, st } v = normalizeWithStandardScore(v, mean, standardDeviation); - output[i] += v; + outputData[i] += v; } diff --git a/modules/iswa/rendering/dataplane.h b/modules/iswa/rendering/dataplane.h index a1c1b6ce79..565ab511c9 100644 --- a/modules/iswa/rendering/dataplane.h +++ b/modules/iswa/rendering/dataplane.h @@ -64,9 +64,8 @@ friend class ISWAGroup; void readHeader(); std::vector readData(); void processData( - std::vector outputData, // Where you want your processed data to go - int inputChannel, // index of the data channel - std::vector inputData, //data that needs processing + float* outputData, // Where you want your processed data to go + std::vector& inputData, //data that needs processing float min, // min value of the input data float max, // max valye of the input data float sum // sum of the input data @@ -83,7 +82,6 @@ friend class ISWAGroup; properties::Vec2Property _backgroundValues; properties::BoolProperty _useLog; properties::BoolProperty _useHistogram; - glm::size3_t _dimensions; // std::shared_ptr _colorbar;