Commit ec9a8b81 authored by Artur Grunau's avatar Artur Grunau
Browse files

Support setting the step of numeric properties

A new attribute has been added to all numeric properties: step value. It
determines the value of a single increment/decrement that numeric
property widgets use when their associated properties are modified using
sliders or spin boxes (users are still able to type any valid property
value in text edits).

Numerous processors and pipelines had to be updated to work with the
changed NumericProperty interface. However, choosing a well-suited step
value for each property can make it easier for users to modify the
property — using one step value for all properties leads to cases where
it is either too small, causing users to go through property values
which don't cause any visible change, or too big, making it difficult to
quickly determine the right property value.
parent a3b78a9c
......@@ -47,7 +47,7 @@ namespace campvis {
DataContainerInspectorCanvas::DataContainerInspectorCanvas(QWidget* parent /*= 0*/)
: tgt::QtThreadedCanvas("DataContainer Inspector", tgt::ivec2(640, 480), tgt::GLCanvas::RGBA_BUFFER, parent, true)
, p_currentSlice("CurrentSlice", "Slice", -1, -1, -1)
, p_currentSlice("CurrentSlice", "Slice", -1, -1, -1, 1)
, p_transferFunction("TransferFunction", "Transfer Function", new Geometry1DTransferFunction(256, tgt::vec2(0.f, 1.f)))
, _dataContainer(0)
, _paintShader(0)
......
......@@ -40,17 +40,19 @@ namespace campvis {
_adjuster->setMinimum(property->getMinValue());
_adjuster->setMaximum(property->getMaxValue());
_adjuster->setDecimals(3);
_adjuster->setSingleStep(stepValue);
_adjuster->setSingleStep(property->getStepValue());
_adjuster->setValue(property->getValue());
addWidget(_adjuster);
connect(_adjuster, SIGNAL(valueChanged(double)), this, SLOT(onAdjusterValueChanged(double)));
property->s_minMaxChanged.connect(this, &FloatPropertyWidget::onPropertyMinMaxChanged);
property->s_stepChanged.connect(this, &FloatPropertyWidget::onPropertyStepChanged);
}
FloatPropertyWidget::~FloatPropertyWidget() {
static_cast<FloatProperty*>(_property)->s_minMaxChanged.disconnect(this);
static_cast<FloatProperty*>(_property)->s_stepChanged.disconnect(this);
}
void FloatPropertyWidget::updateWidgetFromProperty() {
......@@ -74,4 +76,11 @@ namespace campvis {
_adjuster->setMaximum(prop->getMaxValue());
}
}
void FloatPropertyWidget::onPropertyStepChanged(const AbstractProperty* property) {
if (_ignorePropertyUpdates == 0) {
const FloatProperty* prop = static_cast<const FloatProperty*>(property);
_adjuster->setSingleStep(prop->getStepValue());
}
}
}
......@@ -68,6 +68,9 @@ namespace campvis {
/// Slot getting called when the property's min or max value has changed, so that the widget can be updated.
virtual void onPropertyMinMaxChanged(const AbstractProperty* property);
/// Slot getting called when the property's step value has changed, so that the widget can be updated.
virtual void onPropertyStepChanged(const AbstractProperty* property);
DoubleAdjusterWidget* _adjuster; ///< Widget allowing the user to change the property's value
};
......@@ -133,6 +136,9 @@ namespace campvis {
/// Slot getting called when the property's min or max value has changed, so that the widget can be updated.
virtual void onPropertyMinMaxChanged(const AbstractProperty* property);
/// Slot getting called when the property's step value has changed, so that the widget can be updated.
virtual void onPropertyStepChanged(const AbstractProperty* property);
DoubleAdjusterWidget* _adjusters[size];
};
......@@ -147,18 +153,19 @@ namespace campvis {
_adjusters[i]->setMinimum(property->getMinValue()[i]);
_adjusters[i]->setMaximum(property->getMaxValue()[i]);
_adjusters[i]->setDecimals(3);
_adjusters[i]->setSingleStep(0.01);
_adjusters[i]->setSingleStep(property->getStepValue()[i]);
_adjusters[i]->setValue(property->getValue()[i]);
addWidget(_adjusters[i]);
}
property->s_minMaxChanged.connect(this, &VecPropertyWidget::onPropertyMinMaxChanged);
property->s_stepChanged.connect(this, &VecPropertyWidget::onPropertyStepChanged);
}
template<size_t SIZE>
campvis::VecPropertyWidget<SIZE>::~VecPropertyWidget() {
static_cast<PropertyType*>(_property)->s_minMaxChanged.disconnect(this);
static_cast<PropertyType*>(_property)->s_stepChanged.disconnect(this);
}
template<size_t SIZE>
......@@ -193,6 +200,16 @@ namespace campvis {
}
}
template<size_t SIZE>
void campvis::VecPropertyWidget<SIZE>::onPropertyStepChanged(const AbstractProperty* property) {
if (_ignorePropertyUpdates == 0) {
PropertyType* prop = static_cast<PropertyType*>(_property);
for (size_t i = 0; i < size; ++i) {
_adjusters[i]->setSingleStep(prop->getStepValue()[i]);
}
}
}
// ================================================================================================
class Vec2PropertyWidget : public VecPropertyWidget<2> {
......
......@@ -50,6 +50,7 @@ namespace campvis {
_adjuster = new IntAdjusterWidget;
_adjuster->setMinimum(property->getMinValue());
_adjuster->setMaximum(property->getMaxValue());
_adjuster->setSingleStep(property->getStepValue());
_adjuster->setValue(property->getValue());
layout->addWidget(_adjuster, 0, 0, 1, 2);
......@@ -69,10 +70,12 @@ namespace campvis {
connect(_cbEnableTimer, SIGNAL(stateChanged(int)), this, SLOT(onEnableTimerChanged(int)));
connect(_sbInterval, SIGNAL(valueChanged(int)), this, SLOT(onIntervalValueChanged(int)));
property->s_minMaxChanged.connect(this, &IntPropertyWidget::onPropertyMinMaxChanged);
property->s_stepChanged.connect(this, &IntPropertyWidget::onPropertyStepChanged);
}
IntPropertyWidget::~IntPropertyWidget() {
static_cast<IntProperty*>(_property)->s_minMaxChanged.disconnect(this);
static_cast<IntProperty*>(_property)->s_stepChanged.disconnect(this);
}
void IntPropertyWidget::updateWidgetFromProperty() {
......@@ -97,6 +100,13 @@ namespace campvis {
}
}
void IntPropertyWidget::onPropertyStepChanged(const AbstractProperty* property) {
if (_ignorePropertyUpdates == 0) {
IntProperty* prop = static_cast<IntProperty*>(_property);
_adjuster->setSingleStep(prop->getStepValue());
}
}
void IntPropertyWidget::onIntervalValueChanged(int value) {
_timer->setInterval(value);
}
......
......@@ -73,6 +73,9 @@ namespace campvis {
/// Slot getting called when the property's min or max value has changed, so that the widget can be updated.
virtual void onPropertyMinMaxChanged(const AbstractProperty* property);
/// Slot getting called when the property's step value has changed, so that the widget can be updated.
virtual void onPropertyStepChanged(const AbstractProperty* property);
IntAdjusterWidget* _adjuster;
QTimer* _timer;
......@@ -142,6 +145,9 @@ namespace campvis {
/// Slot getting called when the property's min or max value has changed, so that the widget can be updated.
virtual void onPropertyMinMaxChanged(const AbstractProperty* property);
/// Slot getting called when the property's step value has changed, so that the widget can be updated.
virtual void onPropertyStepChanged(const AbstractProperty* property);
IntAdjusterWidget* _adjusters[size];
};
......@@ -155,17 +161,19 @@ namespace campvis {
_adjusters[i] = new IntAdjusterWidget;
_adjusters[i]->setMinimum(property->getMinValue()[i]);
_adjusters[i]->setMaximum(property->getMaxValue()[i]);
_adjusters[i]->setSingleStep(property->getStepValue()[i]);
_adjusters[i]->setValue(property->getValue()[i]);
addWidget(_adjusters[i]);
}
property->s_minMaxChanged.connect(this, &IVecPropertyWidget::onPropertyMinMaxChanged);
property->s_stepChanged.connect(this, &IVecPropertyWidget::onPropertyStepChanged);
}
template<size_t SIZE>
campvis::IVecPropertyWidget<SIZE>::~IVecPropertyWidget() {
static_cast<PropertyType*>(_property)->s_minMaxChanged.disconnect(this);
static_cast<PropertyType*>(_property)->s_stepChanged.disconnect(this);
}
template<size_t SIZE>
......@@ -200,6 +208,16 @@ namespace campvis {
}
}
template<size_t SIZE>
void campvis::IVecPropertyWidget<SIZE>::onPropertyStepChanged(const AbstractProperty* property) {
if (_ignorePropertyUpdates == 0) {
PropertyType* prop = static_cast<PropertyType*>(_property);
for (size_t i = 0; i < size; ++i) {
_adjusters[i]->setSingleStep(prop->getStepValue()[i]);
}
}
}
// ================================================================================================
class IVec2PropertyWidget : public IVecPropertyWidget<2> {
......
......@@ -36,8 +36,8 @@ namespace campvis {
ProcessorDecoratorBackground::ProcessorDecoratorBackground()
: AbstractProcessorDecorator()
, _backgroundColor1("backgroundColor1", "Background Color 1", tgt::vec4(.9f, .9f, .9f, 1), tgt::vec4(0.f), tgt::vec4(1.f))
, _backgroundColor2("backgroundColor2", "Background Color 2", tgt::vec4(.6f, .6f, .6f, 1), tgt::vec4(0.f), tgt::vec4(1.f))
, _backgroundColor1("backgroundColor1", "Background Color 1", tgt::vec4(.9f, .9f, .9f, 1), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _backgroundColor2("backgroundColor2", "Background Color 2", tgt::vec4(.6f, .6f, .6f, 1), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
{
}
......
......@@ -38,7 +38,7 @@ namespace campvis {
: AbstractProcessorDecorator()
, _applyMask("applyMask", "Apply Mask to image", false, AbstractProcessor::INVALID_SHADER)
, _maskID("maskID", "Mask Image ID", "mask", DataNameProperty::READ)
, _maskColor("maskColor", "Mask Color", tgt::vec4(0.f), tgt::vec4(0.f), tgt::vec4(1.f))
, _maskColor("maskColor", "Mask Color", tgt::vec4(0.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _texUnit(0)
, _maskImage(0)
{
......
......@@ -38,12 +38,12 @@ namespace campvis {
: AbstractProcessorDecorator()
, _enableShading("EnableShading", "Enable Shading", true, AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_RESULT)
, _centralDifferences("CentralDifferences", "Use Central instead of Forward Differences", false, AbstractProcessor::INVALID_SHADER | AbstractProcessor::INVALID_RESULT)
, _lightPosition("LightPosition", "Light Position", tgt::vec3(-8.f), tgt::vec3(-500.f), tgt::vec3(500.f))
, _ambientColor("AmbientColor", "Ambient Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f))
, _diffuseColor("DiffuseColor", "Diffuse Light Color", tgt::vec3(0.75f), tgt::vec3(0.f), tgt::vec3(1.f))
, _specularColor("SpecularColor", "Specular Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f))
, _shininess("Shininess", "Specular Shininess", 4.f, 0.f, 64.f)
, _attenuation("Attenuation", "Attenuation Factors", tgt::vec3(0.f), tgt::vec3(0.f), tgt::vec3(1.f))
, _lightPosition("LightPosition", "Light Position", tgt::vec3(-8.f), tgt::vec3(-500.f), tgt::vec3(500.f), tgt::vec3(0.1f))
, _ambientColor("AmbientColor", "Ambient Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _diffuseColor("DiffuseColor", "Diffuse Light Color", tgt::vec3(0.75f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _specularColor("SpecularColor", "Specular Light Color", tgt::vec3(0.5f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _shininess("Shininess", "Specular Shininess", 4.f, 0.f, 64.f, 0.5f)
, _attenuation("Attenuation", "Attenuation Factors", tgt::vec3(0.f), tgt::vec3(0.f), tgt::vec3(1.f), tgt::vec3(0.01f))
, _lightUniformName(lightUniformName)
{
}
......
......@@ -48,9 +48,9 @@ namespace campvis {
, p_exitImageID("exitImageID", "Input Exit Points Image", "", DataNameProperty::READ)
, p_camera("camera", "Camera")
, p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, p_samplingRate("SamplingRate", "Sampling Rate", 2.f, 0.1f, 10.f)
, p_samplingRate("SamplingRate", "Sampling Rate", 2.f, 0.1f, 10.f, 0.1f)
, p_jitterEntryPoints("jitterEntryPoints", "Jitter Entry Points", true)
, p_jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f)
, p_jitterStepSizeMultiplier("jitterStepSizeMultiplier", "Jitter Step Size Multiplier", .5f, .1f, 1.f, 0.01f)
, _fragmentShaderFilename(fragmentShaderFileName)
, _shader(0)
, _bindEntryExitDepthTextures(bindEntryExitDepthTextures)
......
......@@ -64,8 +64,8 @@ namespace campvis {
, tgt::EventListener()
, _lqMode(false)
, _ignoreCanvasSizeUpdate(false)
, _canvasSize("CanvasSize", "Canvas Size", tgt::ivec2(128, 128), tgt::ivec2(1, 1), tgt::ivec2(4096, 4096))
, _effectiveRenderTargetSize("EffectiveRenderTargetSize", "Render Target Size", tgt::ivec2(128, 128), tgt::ivec2(1, 1), tgt::ivec2(4096, 4096))
, _canvasSize("CanvasSize", "Canvas Size", tgt::ivec2(128, 128), tgt::ivec2(1, 1), tgt::ivec2(4096, 4096), tgt::ivec2(1, 1))
, _effectiveRenderTargetSize("EffectiveRenderTargetSize", "Render Target Size", tgt::ivec2(128, 128), tgt::ivec2(1, 1), tgt::ivec2(4096, 4096), tgt::ivec2(1, 1))
, _renderTargetID("renderTargetID", "Render Target ID", "VisualizationPipeline.renderTarget", DataNameProperty::READ)
, _canvas(0)
{
......
......@@ -41,7 +41,7 @@ namespace campvis {
VisualizationProcessor::VisualizationProcessor(IVec2Property& renderTargetSize)
: AbstractProcessor()
, _fbo(0)
, _renderTargetSize("renderTargetSize", "Canvas Size", renderTargetSize.getValue(), renderTargetSize.getMinValue(), renderTargetSize.getMaxValue())
, _renderTargetSize("renderTargetSize", "Canvas Size", renderTargetSize.getValue(), renderTargetSize.getMinValue(), renderTargetSize.getMaxValue(), renderTargetSize.getStepValue())
{
renderTargetSize.addSharedProperty(&_renderTargetSize);
_renderTargetSize.s_changed.connect<VisualizationProcessor>(this, &VisualizationProcessor::onPropertyChanged);
......
......@@ -107,6 +107,7 @@ namespace campvis {
* \param value Initial value of the property
* \param minValue Minimum value for this property
* \param maxValue Maximum value for this property
* \param stepValue Step value for this property
* \param invalidationLevel Invalidation level that this property triggers
*/
NumericProperty(
......@@ -115,6 +116,7 @@ namespace campvis {
const T& value,
const T& minValue,
const T& maxValue,
const T& stepValue,
int invalidationLevel = AbstractProcessor::INVALID_RESULT);
/**
......@@ -144,17 +146,29 @@ namespace campvis {
const T& getMaxValue() const;
/**
* Sets the minimum value if this property.
* Returns the step value of this property.
* \return _stepValue
*/
const T& getStepValue() const;
/**
* Sets the minimum value of this property.
* \param value New minimum value for this property.
*/
virtual void setMinValue(const T& value);
/**
* Sets the minimum value if this property.
* Sets the minimum value of this property.
* \param value New minimum value for this property.
*/
virtual void setMaxValue(const T& value);
/**
* Sets the step value of this property.
* \param value New step value for this property.
*/
virtual void setStepValue(const T& value);
/**
* Increments the value of this property.
*/
......@@ -168,6 +182,9 @@ namespace campvis {
/// Signal emitted, when the property's minimum or maximum value changes.
sigslot::signal1<const AbstractProperty*> s_minMaxChanged;
/// Signal emitted, when the property's step value changes.
sigslot::signal1<const AbstractProperty*> s_stepChanged;
protected:
/**
......@@ -180,6 +197,7 @@ namespace campvis {
T _minValue; ///< Minimum value for this property
T _maxValue; ///< Maximum value for this property
T _stepValue; ///< Step value for this property
static const std::string loggerCat_;
};
......@@ -202,10 +220,11 @@ namespace campvis {
// = Template Implementation ======================================================================
template<typename T>
campvis::NumericProperty<T>::NumericProperty(const std::string& name, const std::string& title, const T& value, const T& minValue, const T& maxValue, int invalidationLevel /*= AbstractProcessor::INVALID_RESULT*/)
campvis::NumericProperty<T>::NumericProperty(const std::string& name, const std::string& title, const T& value, const T& minValue, const T& maxValue, const T& stepValue, int invalidationLevel /*= AbstractProcessor::INVALID_RESULT*/)
: GenericProperty<T>(name, title, value, invalidationLevel)
, _minValue(minValue)
, _maxValue(maxValue)
, _stepValue(stepValue)
{
}
......@@ -241,6 +260,11 @@ namespace campvis {
return _maxValue;
}
template<typename T>
const T& campvis::NumericProperty<T>::getStepValue() const {
return _stepValue;
}
template<typename T>
void campvis::NumericProperty<T>::setMinValue(const T& value) {
this->_minValue = value;
......@@ -271,6 +295,20 @@ namespace campvis {
this->s_minMaxChanged(this);
}
template<typename T>
void campvis::NumericProperty<T>::setStepValue(const T& value) {
this->_stepValue = value;
for (std::set<AbstractProperty*>::iterator it = this->_sharedProperties.begin(); it != this->_sharedProperties.end(); ++it) {
// We ensure all shared properties to be of type NumericProperty<T> in the addSharedProperty overload.
// Hence, static_cast ist safe.
NumericProperty<T>* child = static_cast< NumericProperty<T>* >(*it);
child->setStepValue(value);
}
this->s_stepChanged(this);
}
template<typename T>
void campvis::NumericProperty<T>::increment() {
this->setValue(this->_value + T(1));
......
......@@ -60,7 +60,7 @@ namespace campvis {
, p_sourcePath("SourcePath", "Source Files Path", "")
, p_targetPathColor("TargetPathColor", "Target Path Color Files", "")
, p_targetPathFuzzy("TargetPathFuzzy", "Target Path Fuzzy Files", "")
, p_range("Range", "Files Range", tgt::ivec2(0, 1), tgt::ivec2(0, 0), tgt::ivec2(10000, 10000))
, p_range("Range", "Files Range", tgt::ivec2(0, 1), tgt::ivec2(0, 0), tgt::ivec2(10000, 10000), tgt::ivec2(1, 1))
, p_execute("Execute", "Execute Batch Pipeline")
{
addProcessor(&_usReader);
......
......@@ -68,13 +68,13 @@ namespace campvis {
, p_gradientImageID("GradientImageId", "Gradient Input Image", "", DataNameProperty::READ)
, p_confidenceImageID("ConfidenceImageId", "Confidence Map Input", "", DataNameProperty::READ)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_sliceNumber("sliceNumber", "Slice Number", 0, 0, 0)
, p_sliceNumber("sliceNumber", "Slice Number", 0, 0, 0, 1)
, p_transferFunction("transferFunction", "Transfer Function", new SimpleTransferFunction(256))
, p_confidenceTF("ConfidenceTF", "Confidence to Uncertainty TF", new Geometry1DTransferFunction(256))
, p_view("View", "Image to Render", viewOptions, 12)
, p_confidenceScaling("ConfidenceScaling", "Confidence Scaling", 1.f, .001f, 1000.f)
, p_blurredScaling("BlurredScaling", "Blurred Scaling", 1.f, .001f, 1000.f)
, p_hue("Hue", "Hue for Uncertainty Mapping", .15f, 0.f, 1.f)
, p_confidenceScaling("ConfidenceScaling", "Confidence Scaling", 1.f, .001f, 1000.f, 0.1f)
, p_blurredScaling("BlurredScaling", "Blurred Scaling", 1.f, .001f, 1000.f, 0.1f)
, p_hue("Hue", "Hue for Uncertainty Mapping", .15f, 0.f, 1.f, 0.01f)
, p_use3DTexture("Use3DTexture", "Use 3D Texture", false)
, _shader(0)
{
......
......@@ -49,7 +49,7 @@ namespace campvis {
, p_strainId("StrainDataId", "Input Strain Data ID", "gr.strain", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("camera", "Camera")
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -38,7 +38,7 @@ namespace campvis {
: AbstractProcessor()
, p_inputID("InputID", "Input Image Series ID", "input", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_PROPERTIES)
, p_outputID("OutputID", "Output Image ID", "output", DataNameProperty::WRITE)
, p_imageIndex("ImageIndex", "Image to Select", 0, 0, 0)
, p_imageIndex("ImageIndex", "Image to Select", 0, 0, 0, 1)
{
addProperty(&p_inputID);
addProperty(&p_outputID);
......@@ -64,4 +64,4 @@ namespace campvis {
validate(INVALID_RESULT);
}
}
\ No newline at end of file
}
......@@ -54,9 +54,9 @@ namespace campvis {
, p_strainId("StrainDataId", "Input Strain Data ID", "gr.strain", DataNameProperty::READ)
, p_renderTargetID("p_renderTargetID", "Output Image", "gr.output", DataNameProperty::WRITE)
, p_camera("Camera", "Camera ID")//, "camera", DataNameProperty::READ, AbstractProcessor::INVALID_RESULT, DataNameProperty::CameraData)
, p_lineWidth("LineWidth", "Line width", 3.f, .5f, 10.f)
, p_lineWidth("LineWidth", "Line width", 3.f, .5f, 10.f, 0.1f)
, p_renderMode("RenderMode", "Render Mode", renderModeOptions, 2, AbstractProcessor::INVALID_RESULT | AbstractProcessor::INVALID_SHADER)
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f))
, p_color("color", "Rendering Color", tgt::vec4(1.f), tgt::vec4(0.f), tgt::vec4(1.f), tgt::vec4(0.01f))
, _shader(0)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -169,11 +169,11 @@ namespace campvis {
, p_strainId("StrainId", "Input Strain Data", "input", DataNameProperty::READ, AbstractProcessor::VALID)
, p_outputID("OutputId", "Output Fiber Data", "output", DataNameProperty::WRITE, AbstractProcessor::VALID)
, p_updateButton("UpdateButton", "Perform Tracking")
, p_seedDistance("SeedDistance", "Seed Distance", 4, 1, 16, AbstractProcessor::VALID)
, p_numSteps("NumSteps", "Maximum Number of Steps", 256, 16, 1024, AbstractProcessor::VALID)
, p_stepSize("StepSize", "Base Step Size", 1.f, .01f, 10.f, AbstractProcessor::VALID)
, p_strainThreshold("StrainThreshold", "Local Strain Threshold", .5f, .1f, 1.f, AbstractProcessor::VALID)
, p_maximumAngle("MaximumAngle", "Maxium Angle", 25.f, 0.f, 100.f, AbstractProcessor::VALID)
, p_seedDistance("SeedDistance", "Seed Distance", 4, 1, 16, 1, AbstractProcessor::VALID)
, p_numSteps("NumSteps", "Maximum Number of Steps", 256, 16, 1024, 1, AbstractProcessor::VALID)
, p_stepSize("StepSize", "Base Step Size", 1.f, .01f, 10.f, 0.01f, AbstractProcessor::VALID)
, p_strainThreshold("StrainThreshold", "Local Strain Threshold", .5f, .1f, 1.f, 0.01f, AbstractProcessor::VALID)
, p_maximumAngle("MaximumAngle", "Maxium Angle", 25.f, 0.f, 100.f, 0.1f, AbstractProcessor::VALID)
{
addProperty(&p_strainId);
addProperty(&p_outputID);
......@@ -249,4 +249,4 @@ namespace campvis {
return result;
}
}
\ No newline at end of file
}
......@@ -40,7 +40,7 @@ namespace campvis {
: RaycastingProcessor(canvasSize, "modules/columbia/glsl/strainraycaster.frag", true)
, p_targetImageID("targetImageID", "Output Image", "", DataNameProperty::WRITE)
, p_enableShadowing("EnableShadowing", "Enable Hard Shadows", false, AbstractProcessor::INVALID_SHADER)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f)
, p_shadowIntensity("ShadowIntensity", "Shadow Intensity", .5f, .0f, 1.f, 0.01f)
, p_enableAdaptiveStepsize("EnableAdaptiveStepSize", "Enable Adaptive Step Size", true, AbstractProcessor::INVALID_SHADER)
{
addDecorator(new ProcessorDecoratorShading());
......
......@@ -47,8 +47,8 @@ namespace campvis {
: AbstractProcessor()
, p_url("url", "Image URL", "")
, p_targetImageID("targetImageName", "Target Image ID", "CsvdImageReader.output", DataNameProperty::WRITE)
, p_imageOffset("ImageOffset", "Image Offset in mm", tgt::vec3(0.f), tgt::vec3(-10000.f), tgt::vec3(10000.f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", tgt::vec3(1.f), tgt::vec3(-100.f), tgt::vec3(100.f))
, p_imageOffset("ImageOffset", "Image Offset in mm", tgt::vec3(0.f), tgt::vec3(-10000.f), tgt::vec3(10000.f), tgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", tgt::vec3(1.f), tgt::vec3(-100.f), tgt::vec3(100.f), tgt::vec3(0.1f))
{
addProperty(&p_url);
addProperty(&p_targetImageID);
......
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