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