Notice to GitKraken users: A vulnerability has been found in the SSH key generation of GitKraken versions 7.6.0 to 8.0.0 (https://www.gitkraken.com/blog/weak-ssh-key-fix). If you use GitKraken and have generated a SSH key using one of these versions, please remove it both from your local workstation and from your LRZ GitLab profile.

21.10.2021, 9:00 - 11:00: Due to updates GitLab may be unavailable for some minutes between 09:00 and 11:00.

Commit a3406492 authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Merge branch 'development' of campcloud.informatik.tu-muenchen.de:berge/campvis into development

Conflicts:
	application/campvis.cpp
	modules/columbia/datastructures/fiberdata.cpp
	modules/columbia/datastructures/fiberdata.h
	modules/columbia/pipelines/columbia1.cpp
	modules/columbia/pipelines/columbia1.h
	modules/columbia/processors/strainfibertracker.cpp
	modules/columbia/processors/strainfibertracker.h
parents 7edd6039 e407be3a
......@@ -46,6 +46,10 @@
#include "modules/columbia/pipelines/columbia1.h"
#endif
#ifdef Q_WS_X11
#include <X11/Xlib.h>
#endif
using namespace campvis;
/**
......@@ -56,13 +60,18 @@ using namespace campvis;
* \return 0 if program exited successfully
**/
int main(int argc, char** argv) {
#ifdef Q_WS_X11
std::cout << "XInitThreads()\n";
XInitThreads();
#endif
CampVisApplication app(argc, argv);
//app.addVisualizationPipeline("Advanced Ultrasound Visualization", new AdvancedUsVis());
//app.addVisualizationPipeline("Confidence Map Generation", new CmBatchGeneration());
// app.addVisualizationPipeline("IXPV", new IxpvDemo());
//app.addVisualizationPipeline("SliceVis", new SliceVis());
app.addVisualizationPipeline("DVRVis", new DVRVis());
//app.addVisualizationPipeline("VolumeRendererDemo", new VolumeRendererDemo());
app.addVisualizationPipeline("VolumeRendererDemo", new VolumeRendererDemo());
#ifdef HAS_KISSCL
//app.addVisualizationPipeline("DVR with OpenCL", new OpenCLPipeline());
#endif
......@@ -72,7 +81,7 @@ int main(int argc, char** argv) {
#endif
#ifdef CAMPVIS_HAS_MODULE_COLUMBIA
app.addVisualizationPipeline("Columbia", new Columbia1());
//app.addVisualizationPipeline("Columbia", new Columbia1());
#endif
......
......@@ -60,7 +60,7 @@ namespace campvis {
* 5. call deinit()
* 6. You can now safely destroy your CampVisApplication
*/
class CampVisApplication : QApplication {
class CampVisApplication : public QApplication {
friend class MainWindow;
public:
......
......@@ -53,14 +53,9 @@ namespace campvis {
_combobox->addItems(sl);
dc->s_dataAdded.connect(this, &DataNamePropertyWidget::onDataAdded);
int idx = _combobox->findText(QString::fromStdString(property->getValue()));
if (idx != -1)
_combobox->setCurrentIndex(idx);
else
_combobox->setEditText(QString::fromStdString(property->getValue()));
setCurrentComboBoxText(QString::fromStdString(property->getValue()));
}
addWidget(_combobox);
connect(_combobox, SIGNAL(editTextChanged(const QString&)), this, SLOT(onTextChanged(const QString&)));
}
......@@ -80,13 +75,28 @@ namespace campvis {
void DataNamePropertyWidget::updateWidgetFromProperty() {
DataNameProperty* prop = static_cast<DataNameProperty*>(_property);
QString qs = QString::fromStdString(prop->getValue());
if (_lineEdit->text() != qs) {
if (prop->getAccessInfo() == DataNameProperty::READ) {
_combobox->blockSignals(true);
setCurrentComboBoxText(qs);
_combobox->blockSignals(false);
}
else if (_lineEdit->text() != qs) {
_lineEdit->blockSignals(true);
_lineEdit->setText(qs);
_lineEdit->blockSignals(false);
}
}
void DataNamePropertyWidget::setCurrentComboBoxText(const QString& text) {
int idx = _combobox->findText(text);
if (idx != -1)
_combobox->setCurrentIndex(idx);
else
_combobox->setEditText(text);
}
void DataNamePropertyWidget::onTextChanged(const QString& text) {
DataNameProperty* prop = static_cast<DataNameProperty*>(_property);
++_ignorePropertyUpdates;
......@@ -101,4 +111,4 @@ namespace campvis {
}
}
\ No newline at end of file
}
......@@ -45,7 +45,7 @@ namespace campvis {
* Widget for a DataNameProperty
*/
class DataNamePropertyWidget : public AbstractPropertyWidget {
Q_OBJECT;
Q_OBJECT
public:
/**
......@@ -72,6 +72,16 @@ namespace campvis {
void onTextChanged(const QString& text);
private:
/**
* Set the combo box's current text to the provided value.
*
* If \c text can already be found in the combo box, the corresponding item is made active. Otherwise, \c text
* is set as the contents of the combo box's text edit.
*
* \param text text to be set in the combo box
*/
void setCurrentComboBoxText(const QString& text);
QLineEdit* _lineEdit;
QComboBox* _combobox;
DataContainer* _dc;
......
......@@ -52,7 +52,7 @@ ELSE (WIN32)
)
FIND_LIBRARY(
TBB_LIBRARY
NAMES TBB libtbb
NAMES TBB libtbb.so
PATHS ${TbbDirectory}/lib /usr/lib64 /usr/lib /usr/local/lib64 /usr/local/lib /sw/lib /opt/local/lib
DOC "The TBB library"
)
......
......@@ -243,32 +243,32 @@ namespace campvis {
template<typename T>
void campvis::NumericProperty<T>::setMinValue(const T& value) {
_minValue = value;
this->_minValue = value;
this->setValue(validateValue(this->_value));
for (std::set<AbstractProperty*>::iterator it = _sharedProperties.begin(); it != _sharedProperties.end(); ++it) {
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->setMinValue(value);
}
s_minMaxChanged(this);
this->s_minMaxChanged(this);
}
template<typename T>
void campvis::NumericProperty<T>::setMaxValue(const T& value) {
_maxValue = value;
this->_maxValue = value;
this->setValue(validateValue(this->_value));
for (std::set<AbstractProperty*>::iterator it = _sharedProperties.begin(); it != _sharedProperties.end(); ++it) {
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->setMaxValue(value);
}
s_minMaxChanged(this);
this->s_minMaxChanged(this);
}
template<typename T>
......
......@@ -92,7 +92,7 @@
#include <set>
#include <list>
#include "tbb/include/tbb/spin_mutex.h"
#include "tbb/spin_mutex.h"
#define _SIGSLOT_HAS_TBB
/*
......
......@@ -176,7 +176,7 @@ Texture* TextureManager::loadFromMemory(Texture* t, Texture::Filter filter, bool
break;
default:
LERROR(static_cast<int>(t->bpp_) << " bits per pixel...error!");
return false;
return 0;
}
if (createOGLTex) {
......
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