The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

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 ...@@ -16,20 +16,14 @@ FILE(GLOB TUMVIS_APPLICATION_HEADERS
gui/properties/*.h gui/properties/*.h
) )
#SET(TUMVIS_APPLICATION_SOURCES
# application/tumvis.cpp
# application/tumvispainter.cpp
# datastructures/
#)
SET(TUMVIS_APPLICATION_TO_BE_MOCCED SET(TUMVIS_APPLICATION_TO_BE_MOCCED
gui/mainwindow.h gui/mainwindow.h
gui/pipelinetreewidget.h gui/pipelinetreewidget.h
gui/properties/abstractpropertywidget.h gui/properties/abstractpropertywidget.h
gui/properties/intpropertywidget.h gui/properties/intpropertywidget.h
gui/properties/propertycollectionwidget.h gui/properties/propertycollectionwidget.h
gui/properties/propertywidgetfactory.h
gui/properties/stringpropertywidget.h gui/properties/stringpropertywidget.h
gui/properties/transferfunctionpropertywidget.h
) )
# #
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "application/gui/properties/abstractpropertywidget.h" #include "application/gui/properties/abstractpropertywidget.h"
#include "application/gui/properties/intpropertywidget.h" #include "application/gui/properties/intpropertywidget.h"
#include "application/gui/properties/stringpropertywidget.h" #include "application/gui/properties/stringpropertywidget.h"
#include "application/gui/properties/transferfunctionpropertywidget.h"
#include "core/properties/abstractproperty.h" #include "core/properties/abstractproperty.h"
#include "core/properties/genericproperty.h" #include "core/properties/genericproperty.h"
...@@ -14,12 +15,16 @@ namespace TUMVis { ...@@ -14,12 +15,16 @@ namespace TUMVis {
AbstractPropertyWidget* PropertyWidgetFactory::createWidget(AbstractProperty* property) { AbstractPropertyWidget* PropertyWidgetFactory::createWidget(AbstractProperty* property) {
tgtAssert(property != 0, "Property must not be 0."); 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)) { if (StringProperty* tester = dynamic_cast<StringProperty*>(property)) {
return new StringPropertyWidget(tester); return new StringPropertyWidget(tester);
} }
if (IntProperty* tester = dynamic_cast<IntProperty*>(property)) { if (TransferFunctionProperty* tester = dynamic_cast<TransferFunctionProperty*>(property)) {
return new IntPropertyWidget(tester); return new TransferFunctionPropertyWidget(tester);
} }
return 0; return 0;
......
...@@ -49,6 +49,7 @@ namespace TUMVis { ...@@ -49,6 +49,7 @@ namespace TUMVis {
} }
void AbstractTransferFunction::setIntensityDomain(const tgt::vec2& newDomain) { 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); tbb::mutex::scoped_lock lock(_localMutex);
_intensityDomain = newDomain; _intensityDomain = newDomain;
...@@ -56,5 +57,9 @@ namespace TUMVis { ...@@ -56,5 +57,9 @@ namespace TUMVis {
s_Changed(); s_Changed();
} }
const tgt::vec2& AbstractTransferFunction::getIntensityDomain() const {
return _intensityDomain;
}
} }
\ No newline at end of file
...@@ -67,11 +67,17 @@ namespace TUMVis { ...@@ -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"); 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 * \param newDomain new intensity domain
*/ */
void setIntensityDomain(const tgt::vec2& newDomain); 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. /// Signal emitted when transfer function has changed.
sigslot::signal0<> s_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