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

Cleaned up GenericImageReader and fixed some bugs.

parent fc26d1ca
...@@ -24,6 +24,8 @@ ...@@ -24,6 +24,8 @@
#include "datacontainerfileloaderwidget.h" #include "datacontainerfileloaderwidget.h"
#include <QScrollBar>
namespace campvis { namespace campvis {
const std::string DataContainerFileLoaderWidget::loggerCat_ = "CAMPVis.application.DataContainerFileLoaderWidget"; const std::string DataContainerFileLoaderWidget::loggerCat_ = "CAMPVis.application.DataContainerFileLoaderWidget";
...@@ -36,21 +38,20 @@ namespace campvis { ...@@ -36,21 +38,20 @@ namespace campvis {
, _fileName("fileName", "Image URL", "") , _fileName("fileName", "Image URL", "")
, _propCollectionWidget(0) , _propCollectionWidget(0)
{ {
this->_parent = parentDataInspector; _parent = parentDataInspector;
this->_dataContainer = this->_parent->getDataContainer(); _dataContainer = _parent->getDataContainer();
this->_imgReader = new GenericImageReader(); _imgReader = new GenericImageReader();
this->_imgReader->setVisibibility(".mhd", true);
setupGUI(); setupGUI();
} }
DataContainerFileLoaderWidget::~DataContainerFileLoaderWidget() { DataContainerFileLoaderWidget::~DataContainerFileLoaderWidget() {
if (this->_dataContainer != 0) { if (_dataContainer != 0) {
this->_dataContainer->s_dataAdded.disconnect(this); _dataContainer->s_dataAdded.disconnect(this);
} }
} }
void DataContainerFileLoaderWidget::setDataContainer(DataContainer* dataContainer) { void DataContainerFileLoaderWidget::setDataContainer(DataContainer* dataContainer) {
this->_dataContainer = dataContainer; _dataContainer = dataContainer;
} }
QSize DataContainerFileLoaderWidget::sizeHint() const { QSize DataContainerFileLoaderWidget::sizeHint() const {
...@@ -61,33 +62,39 @@ namespace campvis { ...@@ -61,33 +62,39 @@ namespace campvis {
void DataContainerFileLoaderWidget::setupGUI() { void DataContainerFileLoaderWidget::setupGUI() {
setWindowTitle(tr("Browse File")); setWindowTitle(tr("Browse File"));
this->_layout = new QGridLayout(); _layout = new QGridLayout();
this->_layout->setSpacing(2); _layout->setSpacing(2);
setLayout(_layout); setLayout(_layout);
this->_pipelinePropertiesScrollArea = new QScrollArea(this); _pipelinePropertiesScrollArea = new QScrollArea(this);
this->_pipelinePropertiesScrollArea->setWidgetResizable(true); _pipelinePropertiesScrollArea->setWidgetResizable(true);
this->_pipelinePropertiesScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff); _pipelinePropertiesScrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
this->_pipelinePropertiesScrollArea->setFrameStyle(QScrollArea::NoFrame); _pipelinePropertiesScrollArea->setFrameStyle(QScrollArea::NoFrame);
this->installEventFilter(this);
this->_propCollectionWidget = new PropertyCollectionWidget(this->_pipelinePropertiesScrollArea); _propCollectionWidget = new PropertyCollectionWidget(_pipelinePropertiesScrollArea);
this->_layout->addWidget(this->_propCollectionWidget, 0, 0, 1, 2); _propCollectionWidget->installEventFilter(this);
this->_propCollectionWidget->updatePropCollection(this->_imgReader, this->_dataContainer); _pipelinePropertiesScrollArea->setWidget(_propCollectionWidget);
_propCollectionWidget->updatePropCollection(_imgReader, _dataContainer);
_layout->addWidget(_pipelinePropertiesScrollArea, 0, 0, 1, 2);
this->_btnLoadFile = new QPushButton(tr("Load"), this); _btnLoadFile = new QPushButton(tr("Load"), this);
this->_layout->addWidget(this->_btnLoadFile, 1, 0, 1, 1); _layout->addWidget(_btnLoadFile, 1, 0, 1, 1);
this->_btnCancel = new QPushButton(tr("Cancel"), this); _btnCancel = new QPushButton(tr("Cancel"), this);
this->_layout->addWidget(this->_btnCancel, 1, 1, 1, 1); _layout->addWidget(_btnCancel, 1, 1, 1, 1);
qRegisterMetaType<QtDataHandle>("QtDataHandle"); qRegisterMetaType<QtDataHandle>("QtDataHandle");
connect( connect(_btnCancel, SIGNAL(clicked()), this, SLOT(onBtnCancelClicked()));
this->_btnCancel, SIGNAL(clicked()), connect( _btnLoadFile, SIGNAL(clicked()), this, SLOT(onBtnLoadFileClicked()));
this, SLOT(onBtnCancelClicked())); }
connect(
this->_btnLoadFile, SIGNAL(clicked()),
this, SLOT(onBtnLoadFileClicked())); bool DataContainerFileLoaderWidget::eventFilter(QObject* watched, QEvent* event) {
if (watched == _propCollectionWidget && event->type() == QEvent::Resize) {
_pipelinePropertiesScrollArea->setMinimumWidth(_propCollectionWidget->minimumSizeHint().width() +
_pipelinePropertiesScrollArea->verticalScrollBar()->width());
}
return false;
} }
void DataContainerFileLoaderWidget::init() { void DataContainerFileLoaderWidget::init() {
...@@ -95,19 +102,19 @@ namespace campvis { ...@@ -95,19 +102,19 @@ namespace campvis {
void DataContainerFileLoaderWidget::deinit() { void DataContainerFileLoaderWidget::deinit() {
delete _imgReader; delete _imgReader;
this->_imgReader = nullptr; _imgReader = nullptr;
} }
void DataContainerFileLoaderWidget::onBtnCancelClicked() { void DataContainerFileLoaderWidget::onBtnCancelClicked() {
delete _imgReader; delete _imgReader;
this->_imgReader = nullptr; _imgReader = nullptr;
this->close(); close();
} }
void DataContainerFileLoaderWidget::onBtnLoadFileClicked() { void DataContainerFileLoaderWidget::onBtnLoadFileClicked() {
this->_imgReader->process(*_dataContainer); _imgReader->process(*_dataContainer);
this->_parent->setDataContainer(_dataContainer); _parent->setDataContainer(_dataContainer);
this->close(); close();
} }
} }
...@@ -94,6 +94,14 @@ namespace campvis { ...@@ -94,6 +94,14 @@ namespace campvis {
*/ */
void setupGUI(); void setupGUI();
/**
* Listens to resize events on _pipelinePropertiesWidget and resizes _pipelinePropertiesScrollArea accordingly
* \param watched the object that caused the event
* \param event the event to be filtered
*/
bool eventFilter(QObject* watched, QEvent* event);
protected: protected:
DataContainer* _dataContainer; ///< The DataContainer this widget is inspecting DataContainer* _dataContainer; ///< The DataContainer this widget is inspecting
......
...@@ -59,10 +59,10 @@ namespace campvis { ...@@ -59,10 +59,10 @@ namespace campvis {
, p_importSimilar("ImportSimilar", "Import All Similar Files", false) , p_importSimilar("ImportSimilar", "Import All Similar Files", false)
, _shader(nullptr) , _shader(nullptr)
{ {
this->_ext.push_back(".bmp"); this->_ext.push_back("bmp");
this->_ext.push_back(".jpg"); this->_ext.push_back("jpg");
this->_ext.push_back(".png"); this->_ext.push_back("png");
this->_ext.push_back(".tif"); this->_ext.push_back("tif");
this->p_targetImageID.setValue("DevilImageReader.output"); this->p_targetImageID.setValue("DevilImageReader.output");
addProperty(p_url); addProperty(p_url);
......
...@@ -36,7 +36,7 @@ namespace campvis { ...@@ -36,7 +36,7 @@ namespace campvis {
} }
bool AbstractImageReader::acceptsExtension(const std::string& extension) const { bool AbstractImageReader::acceptsExtension(const std::string& extension) const {
for (std::vector<std::string>::const_iterator it = this->_ext.begin(); it != this->_ext.end(); ++it) { for (auto it = this->_ext.begin(); it != this->_ext.end(); ++it) {
if (*it == extension) { if (*it == extension) {
return true; return true;
} }
......
...@@ -43,7 +43,7 @@ namespace campvis { ...@@ -43,7 +43,7 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".csv"); this->_ext.push_back("csv");
this->p_targetImageID.setValue("CsvdImageReader.output"); this->p_targetImageID.setValue("CsvdImageReader.output");
addProperty(p_url); addProperty(p_url);
......
...@@ -40,34 +40,45 @@ ...@@ -40,34 +40,45 @@
#include "modules/io/processors/vtkimagereader.h" #include "modules/io/processors/vtkimagereader.h"
namespace campvis { namespace campvis {
namespace {
struct checkExtension {
checkExtension(const std::string& str) : _str(str) {}
bool operator()(const std::pair<AbstractImageReader*, MetaProperty*>& v) const {
return v.first->acceptsExtension(this->_str);
}
private:
std::string _str;
};
}
const std::string GenericImageReader::loggerCat_ = "CAMPVis.modules.io.GenericImageReader"; const std::string GenericImageReader::loggerCat_ = "CAMPVis.modules.io.GenericImageReader";
GenericImageReader::GenericImageReader() GenericImageReader::GenericImageReader()
: AbstractProcessor() : AbstractProcessor()
, p_url("Url", "Image URL", "", StringProperty::OPEN_FILENAME) , p_url("Url", "Image URL", "", StringProperty::OPEN_FILENAME)
, p_targetImageID("TargetImageName", "Target Image ID", "AbstractImageReader.output", DataNameProperty::WRITE) , p_targetImageID("TargetImageName", "Target Image ID", "AbstractImageReader.output", DataNameProperty::WRITE)
, _currentlyVisible(nullptr)
{ {
addProperty(p_url); addProperty(p_url);
addProperty(p_targetImageID); addProperty(p_targetImageID);
p_url.s_changed.connect(this, &GenericImageReader::onUrlPropertyChanged); p_url.s_changed.connect(this, &GenericImageReader::onUrlPropertyChanged);
this->addReader(new CsvdImageReader()); addReader(new CsvdImageReader());
this->addReader(new LtfImageReader()); addReader(new LtfImageReader());
this->addReader(new MhdImageReader()); addReader(new MhdImageReader());
this->addReader(new NiftiImageReader()); addReader(new NiftiImageReader());
this->addReader(new RawImageReader()); addReader(new RawImageReader());
this->addReader(new VtkImageReader()); addReader(new VtkImageReader());
#ifdef CAMPVIS_HAS_MODULE_DEVIL #ifdef CAMPVIS_HAS_MODULE_DEVIL
this->addReader(new DevilImageReader()); addReader(new DevilImageReader());
#endif #endif
this->_ext = "";
this->_currentlyVisible = nullptr;
} }
GenericImageReader::~GenericImageReader() { GenericImageReader::~GenericImageReader() {
for(std::map<AbstractImageReader*, MetaProperty*>::iterator it = this->_readers.begin(); it != this->_readers.end(); ++it) { for (auto it = _readers.begin(); it != _readers.end(); ++it) {
delete it->second; delete it->second;
delete it->first; delete it->first;
} }
...@@ -78,7 +89,7 @@ namespace campvis { ...@@ -78,7 +89,7 @@ namespace campvis {
} }
void GenericImageReader::deinit() { void GenericImageReader::deinit() {
for(std::map<AbstractImageReader*, MetaProperty*>::iterator it = this->_readers.begin(); it != this->_readers.end(); ++it) { for(std::map<AbstractImageReader*, MetaProperty*>::iterator it = _readers.begin(); it != _readers.end(); ++it) {
// deinit MetaProperty first! // deinit MetaProperty first!
if (nullptr != it->second) { if (nullptr != it->second) {
it->second->deinit(); it->second->deinit();
...@@ -91,33 +102,28 @@ namespace campvis { ...@@ -91,33 +102,28 @@ namespace campvis {
} }
void GenericImageReader::updateResult(DataContainer& data) { void GenericImageReader::updateResult(DataContainer& data) {
std::map<AbstractImageReader*, MetaProperty*>::iterator it = std::find_if(this->_readers.begin(), this->_readers.end(), checkExt(this->_ext)); const std::string extension = cgt::FileSystem::fileExtension(p_url.getValue());
if(it != this->_readers.end()) { auto it = findReader(extension);
if (this->_currentlyVisible != it->second) {
if(nullptr != this->_currentlyVisible) { if (it != this->_readers.end()) {
this->_currentlyVisible->setVisible(false);
}
(it->second)->setVisible(true);
this->_currentlyVisible = it->second;
}
it->first->process(data); it->first->process(data);
} }
} }
void GenericImageReader::setVisibibility(const std::string& extention, bool visibility) { void GenericImageReader::updateVisibility(const std::string& extension) {
std::string _ext = extention; if (_currentlyVisible != nullptr) {
std::map<AbstractImageReader*, MetaProperty*>::iterator it = std::find_if(this->_readers.begin(), this->_readers.end(), checkExt(_ext)); _currentlyVisible->setVisible(false);
if(it != this->_readers.end()) { _currentlyVisible = nullptr;
if(nullptr != this->_currentlyVisible) {
this->_currentlyVisible->setVisible(!visibility);
} }
(it->second)->setVisible(visibility);
auto it = findReader(extension);
if (it != this->_readers.end()) {
it->second->setVisible(true);
this->_currentlyVisible = it->second; this->_currentlyVisible = it->second;
//(it->first)->process(data);
} }
} }
int GenericImageReader::addReader(AbstractImageReader* reader) { void GenericImageReader::addReader(AbstractImageReader* reader) {
MetaProperty* meta = new MetaProperty(reader->getName() + "MetaProp", reader->getName()); MetaProperty* meta = new MetaProperty(reader->getName() + "MetaProp", reader->getName());
meta->addPropertyCollection(*reader); meta->addPropertyCollection(*reader);
meta->setVisible(false); meta->setVisible(false);
...@@ -128,28 +134,21 @@ namespace campvis { ...@@ -128,28 +134,21 @@ namespace campvis {
p_targetImageID.addSharedProperty(&reader->p_targetImageID); p_targetImageID.addSharedProperty(&reader->p_targetImageID);
reader->p_targetImageID.setVisible(false); reader->p_targetImageID.setVisible(false);
this->_readers.insert(std::pair<AbstractImageReader*, MetaProperty*>(reader, meta)); _readers.insert(std::pair<AbstractImageReader*, MetaProperty*>(reader, meta));
return 0;
} }
void GenericImageReader::onUrlPropertyChanged(const AbstractProperty* prop) { void GenericImageReader::onUrlPropertyChanged(const AbstractProperty* prop) {
// first set visibility of old extension to false
setVisibibility(_ext, false);
// now update extension // now update extension
const std::string& url = this->p_url.getValue(); std::string extension = cgt::FileSystem::fileExtension(p_url.getValue());
size_t extPos = url.rfind('.'); updateVisibility(extension);
if (extPos != std::string::npos) {
this->_ext = url.substr(extPos);
}
// set visibility of new extension's properties to true
setVisibibility(_ext, true);
} }
void GenericImageReader::adjustToNewExtension() { std::map<AbstractImageReader*, MetaProperty*>::const_iterator GenericImageReader::findReader(const std::string& extension) const {
auto it = std::find_if(_readers.begin(), _readers.end(), checkExtension(extension));
if (it == _readers.end())
it = std::find_if(_readers.begin(), _readers.end(), checkExtension("raw"));
return it;
} }
} }
\ No newline at end of file
...@@ -72,7 +72,7 @@ namespace campvis { ...@@ -72,7 +72,7 @@ namespace campvis {
/// \see AbstractProcessor::getProcessorState() /// \see AbstractProcessor::getProcessorState()
virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; }; virtual ProcessorState getProcessorState() const { return AbstractProcessor::TESTING; };
void setVisibibility(const std::string& extention, bool visibility); void updateVisibility(const std::string& extension);
StringProperty p_url; ///< URL for file to read StringProperty p_url; ///< URL for file to read
DataNameProperty p_targetImageID; ///< image ID for read image DataNameProperty p_targetImageID; ///< image ID for read image
...@@ -86,10 +86,7 @@ namespace campvis { ...@@ -86,10 +86,7 @@ namespace campvis {
private: private:
void onUrlPropertyChanged(const AbstractProperty* prop); void onUrlPropertyChanged(const AbstractProperty* prop);
void adjustToNewExtension();
std::map<AbstractImageReader*, MetaProperty*> _readers; std::map<AbstractImageReader*, MetaProperty*> _readers;
std::string _ext;
MetaProperty* _currentlyVisible; MetaProperty* _currentlyVisible;
/** /**
...@@ -99,19 +96,18 @@ namespace campvis { ...@@ -99,19 +96,18 @@ namespace campvis {
* *
* /param reader pointer to the reader to be added * /param reader pointer to the reader to be added
*/ */
int addReader(AbstractImageReader* reader); void addReader(AbstractImageReader* reader);
};
/**
* Returns an iterator to the corresponding reader-property pair that can read a file with
* the given extension. If there is no matching reader found, the RawImageReader is returned.
* \param extension Extension to look for.
* \return An iterator to the corresponding reader-property pair.
*/
std::map<AbstractImageReader*, MetaProperty*>::const_iterator findReader(const std::string& extension) const;
struct checkExt {
checkExt( std::string str ) : _str(str) {}
bool operator()( const std::pair<AbstractImageReader*, MetaProperty*>& v ) const {
return v.first->acceptsExtension(this->_str);
}
private:
std::string _str;
}; };
} }
#endif // GENERICIMAGEREADER_H__ #endif // GENERICIMAGEREADER_H__
...@@ -53,7 +53,7 @@ namespace campvis { ...@@ -53,7 +53,7 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".ltf"); this->_ext.push_back("ltf");
this->p_targetImageID.setValue("LtfImageReader.output"); this->p_targetImageID.setValue("LtfImageReader.output");
addProperty(p_url); addProperty(p_url);
......
...@@ -44,7 +44,7 @@ namespace campvis { ...@@ -44,7 +44,7 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".mhd"); this->_ext.push_back("mhd");
this->p_targetImageID.setValue("MhdImageReader.output"); this->p_targetImageID.setValue("MhdImageReader.output");
addProperty(p_url); addProperty(p_url);
addProperty(p_targetImageID); addProperty(p_targetImageID);
......
...@@ -362,8 +362,8 @@ namespace campvis { ...@@ -362,8 +362,8 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".hdr"); this->_ext.push_back("hdr");
this->_ext.push_back(".nii"); this->_ext.push_back("nii");
this->p_targetImageID.setValue("NiftiImageReader.output"); this->p_targetImageID.setValue("NiftiImageReader.output");
addProperty(p_url); addProperty(p_url);
addProperty(p_targetImageID); addProperty(p_targetImageID);
......
...@@ -58,7 +58,7 @@ namespace campvis { ...@@ -58,7 +58,7 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".raw"); this->_ext.push_back("raw");
this->p_targetImageID.setValue("RawImageReader.output"); this->p_targetImageID.setValue("RawImageReader.output");
addProperty(p_url); addProperty(p_url);
......
...@@ -48,7 +48,7 @@ namespace campvis { ...@@ -48,7 +48,7 @@ namespace campvis {
, p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f)) , p_imageOffset("ImageOffset", "Image Offset in mm", cgt::vec3(0.f), cgt::vec3(-10000.f), cgt::vec3(10000.f), cgt::vec3(0.1f))
, p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f)) , p_voxelSize("VoxelSize", "Voxel Size in mm", cgt::vec3(1.f), cgt::vec3(-100.f), cgt::vec3(100.f), cgt::vec3(0.1f))
{ {
this->_ext.push_back(".vtk"); this->_ext.push_back("vtk");
this->p_targetImageID.setValue("VtkImageReader.output"); this->p_targetImageID.setValue("VtkImageReader.output");
addProperty(p_url); addProperty(p_url);
......
...@@ -36,18 +36,15 @@ namespace campvis { ...@@ -36,18 +36,15 @@ namespace campvis {
AdvDVRVis::AdvDVRVis(DataContainer* dc) AdvDVRVis::AdvDVRVis(DataContainer* dc)
: AutoEvaluationPipeline(dc) : AutoEvaluationPipeline(dc)
, _tcp(&_canvasSize)
, _lsp() , _lsp()
, _imageReader() , _imageReader()
, _vr(&_canvasSize, new AdvOptimizedRaycaster(&_canvasSize)) , _ve(&_canvasSize, new SliceExtractor(nullptr), new AdvOptimizedRaycaster(nullptr))
{ {
_tcp.addLqModeProcessor(&_vr); addEventListenerToBack(&_ve);
addEventListenerToBack(&_tcp);
addProcessor(&_tcp);
addProcessor(&_lsp); addProcessor(&_lsp);
addProcessor(&_imageReader);