mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-23 04:30:09 -05:00
Auto filter property
This commit is contained in:
@@ -45,6 +45,7 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary)
|
||||
:CygnetPlane(dictionary)
|
||||
,_useLog("useLog","Use Logarithm", false)
|
||||
,_useHistogram("useHistogram", "Use Histogram", true)
|
||||
,_autoFilter("autoFilter", "Auto Filter", true)
|
||||
,_normValues("normValues", "Normalize Values", glm::vec2(1.0,1.0), glm::vec2(0), glm::vec2(5.0))
|
||||
,_backgroundValues("backgroundValues", "Background Values", glm::vec2(0.0), glm::vec2(0), glm::vec2(1.0))
|
||||
,_transferFunctionsFile("transferfunctions", "Transfer Functions", "${SCENE}/iswa/tfs/hot.tf")
|
||||
@@ -59,13 +60,13 @@ DataPlane::DataPlane(const ghoul::Dictionary& dictionary)
|
||||
|
||||
addProperty(_useLog);
|
||||
addProperty(_useHistogram);
|
||||
addProperty(_autoFilter);
|
||||
addProperty(_normValues);
|
||||
addProperty(_backgroundValues);
|
||||
addProperty(_transferFunctionsFile);
|
||||
addProperty(_dataOptions);
|
||||
|
||||
_type = IswaManager::CygnetType::Data;
|
||||
|
||||
}
|
||||
|
||||
DataPlane::~DataPlane(){}
|
||||
@@ -78,6 +79,7 @@ bool DataPlane::initialize(){
|
||||
}else{
|
||||
OsEng.gui()._iswa.registerProperty(&_useLog);
|
||||
OsEng.gui()._iswa.registerProperty(&_useHistogram);
|
||||
OsEng.gui()._iswa.registerProperty(&_autoFilter);
|
||||
OsEng.gui()._iswa.registerProperty(&_normValues);
|
||||
OsEng.gui()._iswa.registerProperty(&_backgroundValues);
|
||||
OsEng.gui()._iswa.registerProperty(&_transferFunctionsFile);
|
||||
@@ -196,7 +198,8 @@ bool DataPlane::loadTexture() {
|
||||
if(data.empty())
|
||||
return false;
|
||||
|
||||
_backgroundValues.setValue(_dataProcessor->filterValues());
|
||||
if(_autoFilter.value())
|
||||
_backgroundValues.setValue(_dataProcessor->filterValues());
|
||||
|
||||
bool texturesReady = false;
|
||||
std::vector<int> selectedOptions = _dataOptions.value();
|
||||
|
||||
Reference in New Issue
Block a user