Remove binary property. Make volume modules part of default build (#878)

This commit is contained in:
Alexander Bock
2019-05-20 18:03:36 -06:00
committed by GitHub
parent cc69ef5cdd
commit 62728e84d0
7 changed files with 4 additions and 108 deletions

View File

@@ -1,37 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___BINARYPROPERTY___H__
#define __OPENSPACE_CORE___BINARYPROPERTY___H__
#include <openspace/properties/templateproperty.h>
#include <vector>
namespace openspace::properties {
REGISTER_TEMPLATEPROPERTY_HEADER(BinaryProperty, std::vector<char>)
} // namespace openspace::properties
#endif // __OPENSPACE_CORE___BINARYPROPERTY___H__

View File

@@ -1,3 +1,5 @@
set(DEFAULT_MODULE ON)
set (OPENSPACE_DEPENDENCIES
space
)

View File

@@ -1,3 +1,5 @@
set(DEFAULT_MODULE ON)
set (OPENSPACE_DEPENDENCIES
space
)

View File

@@ -76,7 +76,6 @@ TransferFunctionHandler::TransferFunctionHandler(const properties::StringPropert
, _maxValue(MaxValueInfo)
, _saveTransferFunction(SaveTransferFunctionInfo)
, _transferFunctionProperty(TransferFunctionInfo)
, _histogramProperty(HistogramInfo)
{
_transferFunction = std::make_shared<openspace::TransferFunction>(
_transferFunctionPath
@@ -86,7 +85,6 @@ TransferFunctionHandler::TransferFunctionHandler(const properties::StringPropert
void TransferFunctionHandler::initialize() {
addProperty(_transferFunctionPath);
addProperty(_transferFunctionProperty);
addProperty(_histogramProperty);
addProperty(_dataUnit);
addProperty(_minValue);
addProperty(_maxValue);
@@ -111,10 +109,6 @@ void TransferFunctionHandler::initialize() {
_saveTransferFunction.onChange([this]() { saveEnvelopes(); });
}
void TransferFunctionHandler::setHistogramProperty(openspace::Histogram& histogram) {
_histogramProperty.setValue(histogram.getBinaryData());
}
void TransferFunctionHandler::setTexture() {
if (_transferFunctionProperty.value().createTexture(*_texture)) {
uploadTexture();

View File

@@ -28,7 +28,6 @@
#include <openspace/properties/propertyowner.h>
#include <modules/volume/transferfunctionproperty.h>
#include <openspace/properties/binaryproperty.h>
#include <openspace/properties/stringproperty.h>
#include <openspace/properties/triggerproperty.h>
#include <memory>
@@ -49,8 +48,6 @@ public:
void initialize();
void setHistogramProperty(openspace::Histogram& histogram);
void setTexture();
void loadStoredEnvelopes();
void saveEnvelopes();
@@ -72,7 +69,6 @@ private:
properties::TriggerProperty _saveTransferFunction;
std::string _filePath;
properties::TransferFunctionProperty _transferFunctionProperty;
properties::BinaryProperty _histogramProperty;
std::shared_ptr<openspace::TransferFunction> _transferFunction;
std::shared_ptr<ghoul::opengl::Texture> _texture;
};

View File

@@ -69,7 +69,6 @@ set(OPENSPACE_SOURCE
${OPENSPACE_BASE_DIR}/src/performance/performancemeasurement.cpp
${OPENSPACE_BASE_DIR}/src/performance/performancelayout.cpp
${OPENSPACE_BASE_DIR}/src/performance/performancemanager.cpp
${OPENSPACE_BASE_DIR}/src/properties/binaryproperty.cpp
${OPENSPACE_BASE_DIR}/src/properties/optionproperty.cpp
${OPENSPACE_BASE_DIR}/src/properties/property.cpp
${OPENSPACE_BASE_DIR}/src/properties/propertyowner.cpp
@@ -249,7 +248,6 @@ set(OPENSPACE_HEADER
${OPENSPACE_BASE_DIR}/include/openspace/performance/performancemeasurement.h
${OPENSPACE_BASE_DIR}/include/openspace/performance/performancelayout.h
${OPENSPACE_BASE_DIR}/include/openspace/performance/performancemanager.h
${OPENSPACE_BASE_DIR}/include/openspace/properties/binaryproperty.h
${OPENSPACE_BASE_DIR}/include/openspace/properties/numericalproperty.h
${OPENSPACE_BASE_DIR}/include/openspace/properties/numericalproperty.inl
${OPENSPACE_BASE_DIR}/include/openspace/properties/optionproperty.h

View File

@@ -1,59 +0,0 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2019 *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
* software and associated documentation files (the "Software"), to deal in the Software *
* without restriction, including without limitation the rights to use, copy, modify, *
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
* permit persons to whom the Software is furnished to do so, subject to the following *
* conditions: *
* *
* The above copyright notice and this permission notice shall be included in all copies *
* or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
****************************************************************************************/
#include <openspace/properties/binaryproperty.h>
#include <ghoul/lua/ghoul_lua.h>
namespace openspace::properties {
REGISTER_TEMPLATEPROPERTY_SOURCE(
BinaryProperty,
std::vector<char>,
std::vector<char>(0),
[](lua_State* state, bool& success) -> std::vector<char> {
// TODO: Convert from lua
std::vector<char> result;
success = true;
return result;
},
[](lua_State* state, std::vector<char>) -> bool {
// TODO: Convert to lua
return true;
},
[](std::string value, bool& success) -> std::vector<char> {
// TODO: From json conversion
std::vector<char> result;
success = true;
return result;
},
[](std::string& outValue, std::vector<char> inValue) -> bool {
// TODO: To json conversion
outValue = "";
return true;
},
LUA_TTABLE
)
} // namespace openspace::properties