Starting from 2021-07-01, all LRZ GitLab users will be required to explicitly accept the GitLab Terms of Service. Please see the detailed information at https://doku.lrz.de/display/PUBLIC/GitLab and make sure that your projects conform to the requirements.

Commit c16fc903 authored by schultezub's avatar schultezub
Browse files

started implementing TransferFunctionPropertyWidget

git-svn-id: https://camplinux.in.tum.de/svn/campvis/trunk@210 bb408c1c-ae56-11e1-83d9-df6b3e0c105e
parent 3e654cec
......@@ -16,20 +16,14 @@ FILE(GLOB TUMVIS_APPLICATION_HEADERS
gui/properties/*.h
)
#SET(TUMVIS_APPLICATION_SOURCES
# application/tumvis.cpp
# application/tumvispainter.cpp
# datastructures/
#)
SET(TUMVIS_APPLICATION_TO_BE_MOCCED
gui/mainwindow.h
gui/pipelinetreewidget.h
gui/properties/abstractpropertywidget.h
gui/properties/intpropertywidget.h
gui/properties/propertycollectionwidget.h
gui/properties/propertywidgetfactory.h
gui/properties/stringpropertywidget.h
gui/properties/transferfunctionpropertywidget.h
)
#
......
......@@ -3,6 +3,7 @@
#include "application/gui/properties/abstractpropertywidget.h"
#include "application/gui/properties/intpropertywidget.h"
#include "application/gui/properties/stringpropertywidget.h"
#include "application/gui/properties/transferfunctionpropertywidget.h"
#include "core/properties/abstractproperty.h"
#include "core/properties/genericproperty.h"
......@@ -14,12 +15,16 @@ namespace TUMVis {
AbstractPropertyWidget* PropertyWidgetFactory::createWidget(AbstractProperty* property) {
tgtAssert(property != 0, "Property must not be 0.");
if (IntProperty* tester = dynamic_cast<IntProperty*>(property)) {
return new IntPropertyWidget(tester);
}
if (StringProperty* tester = dynamic_cast<StringProperty*>(property)) {
return new StringPropertyWidget(tester);
return new StringPropertyWidget(tester);
}
if (IntProperty* tester = dynamic_cast<IntProperty*>(property)) {
return new IntPropertyWidget(tester);
if (TransferFunctionProperty* tester = dynamic_cast<TransferFunctionProperty*>(property)) {
return new TransferFunctionPropertyWidget(tester);
}
return 0;
......
......@@ -49,6 +49,7 @@ namespace TUMVis {
}
void AbstractTransferFunction::setIntensityDomain(const tgt::vec2& newDomain) {
tgtAssert(newDomain.x <= newDomain.y, "Intensity domain is not a valid interval.");
{
tbb::mutex::scoped_lock lock(_localMutex);
_intensityDomain = newDomain;
......@@ -56,5 +57,9 @@ namespace TUMVis {
s_Changed();
}
const tgt::vec2& AbstractTransferFunction::getIntensityDomain() const {
return _intensityDomain;
}
}
\ No newline at end of file
......@@ -67,11 +67,17 @@ namespace TUMVis {
void bind(tgt::Shader* shader, const tgt::TextureUnit& texUnit, const std::string& textureUniform = "_tfTex", const std::string& textureParametersUniform = "_tfTextureParameters");
/**
* Sets the intensity Domain where the transfer function is mapped to during classification.
* Sets the intensity domain where the transfer function is mapped to during classification.
* \param newDomain new intensity domain
*/
void setIntensityDomain(const tgt::vec2& newDomain);
/**
* Returns the intensity domain where the transfer function is mapped to during classification.
* \return _intensityDomain
*/
const tgt::vec2& getIntensityDomain() const;
/// Signal emitted when transfer function has changed.
sigslot::signal0<> s_Changed;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment