Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing 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:

Commit 0ed0a6bb authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge Committed by Artur Grunau
Browse files

Lua scripting: add a wrapper for FloatProperty

To make it possible to access GlImageResampler's p_resampleScale
property from Lua, FloatProperty and the classes it depends on have been
wrapped using SWIG.

References #1
parent 818c79cc
......@@ -5,6 +5,7 @@
#include "core/properties/genericproperty.h"
#include "core/properties/numericproperty.h"
#include "core/properties/floatingpointproperty.h"
#include "core/properties/datanameproperty.h"
#include "core/properties/transferfunctionproperty.h"
#include "core/pipeline/abstractprocessor.h"
......@@ -71,7 +72,7 @@ namespace campvis {
template<typename T>
class NumericProperty {
class NumericProperty : public GenericProperty<T> {
const std::string& name,
......@@ -85,9 +86,44 @@ namespace campvis {
virtual ~NumericProperty();
%template(Ivec2GenericProperty) GenericProperty< tgt::Vector2<int> >;
%template(IVec2Property) NumericProperty< tgt::Vector2<int> >;
typedef NumericProperty< tgt::Vector2<int> > IVec2Property;
template<typename T>
struct FloatingPointPropertyTraits {};
struct FloatingPointPropertyTraits<float> {
typedef int DecimalsType;
%template() FloatingPointPropertyTraits<float>;
template<typename T>
class FloatingPointProperty : public NumericProperty<T> {
typedef typename FloatingPointPropertyTraits<T>::DecimalsType DecimalsType;
const std::string& name,
const std::string& title,
const T& value,
const T& minValue,
const T& maxValue,
const T& stepValue = T(0.01f),
const DecimalsType& decimals = DecimalsType(3),
int invalidationLevel = AbstractProcessor::INVALID_RESULT);
virtual ~FloatingPointProperty();
%template(FloatGenericProperty) GenericProperty<float>;
%template(FloatNumericProperty) NumericProperty<float>;
%template(FloatProperty) FloatingPointProperty<float>;
typedef FloatingPointProperty< float > FloatProperty;
/* AbstractProcessor */
class AbstractProcessor {
......@@ -17,6 +17,7 @@ namespace campvis {
campvis::DataNameProperty p_inputImage;
campvis::DataNameProperty p_outputImage;
campvis::FloatProperty p_resampleScale;
......@@ -42,6 +42,8 @@ function pipeline:init()
function pipeline:deinit()
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