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: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

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> {
public:
NumericProperty(
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 {};
template<>
struct FloatingPointPropertyTraits<float> {
typedef int DecimalsType;
};
%template() FloatingPointPropertyTraits<float>;
template<typename T>
class FloatingPointProperty : public NumericProperty<T> {
public:
typedef typename FloatingPointPropertyTraits<T>::DecimalsType DecimalsType;
FloatingPointProperty(
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 {
%immutable;
campvis::DataNameProperty p_inputImage;
campvis::DataNameProperty p_outputImage;
campvis::FloatProperty p_resampleScale;
%mutable;
};
}
......@@ -42,6 +42,8 @@ function pipeline:init()
dvrTF:addGeometry(geometry2)
self.ve:getProperty("TransferFunction"):replaceTF(dvrTF)
self.resampler.p_resampleScale:setValue(1.25)
end
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