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

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

Added a field _pipelineName to AutoEvaluationPipeline. This allows to...

Added a field _pipelineName to AutoEvaluationPipeline. This allows to implement AutoEvaluationPipeline::getName() so that AutoEvaluationPipeline is no longer abstract. Consequently, the LuaPipeline is no longer needed.

This change was also used to change the AbstractPipeline constructor signature to pass-by-reference instead of pass-by-pointer for the pipeline's DataContainer. This presents the semantics more clearly since the DataContainer must not be 0.
parent 50c0b05d
......@@ -37,9 +37,11 @@ namespace campvis {
class CAMPVIS_MODULES_API AdvDVRVis : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a AdvDVRVis pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit AdvDVRVis(DataContainer* dc);
explicit AdvDVRVis(DataContainer& dc);
/**
* Virtual Destructor
......@@ -49,8 +51,6 @@ namespace campvis {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "AdvDVRVis"; };
......
......@@ -31,8 +31,8 @@
namespace campvis {
DVRVis::DVRVis(DataContainer* dc)
: AutoEvaluationPipeline(dc)
DVRVis::DVRVis(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _tcp(&_canvasSize)
, _lsp()
, _imageReader()
......
......@@ -46,9 +46,11 @@ namespace campvis {
class CAMPVIS_MODULES_API DVRVis : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a DVRVis pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit DVRVis(DataContainer* dc);
explicit DVRVis(DataContainer& dataContainer);
/**
* Virtual Destructor
......@@ -58,8 +60,6 @@ namespace campvis {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "DVRVis"; };
protected:
......
......@@ -36,8 +36,8 @@
namespace campvis {
GeometryRendererDemo::GeometryRendererDemo(DataContainer* dc)
: AutoEvaluationPipeline(dc)
GeometryRendererDemo::GeometryRendererDemo(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _tcp(&_canvasSize)
, _lsp()
, _geometryReader()
......@@ -129,9 +129,9 @@ namespace campvis {
void GeometryRendererDemo::onProcessorValidated(AbstractProcessor* processor) {
if (processor == &_geometryReader) {
// update camera
ScopedTypedData<IHasWorldBounds> lv(*_data, _geometryReader.p_targetImageID.getValue());
ScopedTypedData<IHasWorldBounds> teapot(*_data, "teapot");
ScopedTypedData<IHasWorldBounds> cube(*_data, "cube");
ScopedTypedData<IHasWorldBounds> lv(*_dataContainer, _geometryReader.p_targetImageID.getValue());
ScopedTypedData<IHasWorldBounds> teapot(*_dataContainer, "teapot");
ScopedTypedData<IHasWorldBounds> cube(*_dataContainer, "cube");
if (lv != 0 && teapot != 0) {
cgt::Bounds unionBounds;
unionBounds.addVolume(lv->getWorldBounds());
......
......@@ -38,9 +38,11 @@ namespace campvis {
class CAMPVIS_MODULES_API GeometryRendererDemo : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a GeometryRendererDemo pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit GeometryRendererDemo(DataContainer* dc);
explicit GeometryRendererDemo(DataContainer& dc);
/**
* Virtual Destructor
......@@ -54,7 +56,7 @@ namespace campvis {
virtual void deinit();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
virtual std::string getName() const { return getId(); };
static const std::string getId() { return "GeometryRendererDemo"; };
......
......@@ -32,8 +32,8 @@
namespace campvis {
MprDemo::MprDemo(DataContainer* dc)
: AutoEvaluationPipeline(dc)
MprDemo::MprDemo(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _tcp(&_canvasSize)
, _lsp()
, _imageReader()
......
......@@ -38,9 +38,11 @@ namespace campvis {
class CAMPVIS_MODULES_API MprDemo : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a MprDemo pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit MprDemo(DataContainer* dc);
explicit MprDemo(DataContainer& dc);
/**
* Virtual Destructor
......@@ -50,8 +52,6 @@ namespace campvis {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "MprDemo"; };
......
......@@ -31,8 +31,8 @@
namespace campvis {
SliceVis::SliceVis(DataContainer* dc)
: AutoEvaluationPipeline(dc)
SliceVis::SliceVis(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _imageReader()
, _sliceExtractor(&_canvasSize)
, _wheelHandler(&_sliceExtractor.p_zSliceNumber)
......@@ -82,7 +82,7 @@ namespace campvis {
void SliceVis::onProcessorValidated(AbstractProcessor* processor) {
if (processor == &_imageReader) {
ScopedTypedData<ImageData> img(*_data, _imageReader.p_targetImageID.getValue());
ScopedTypedData<ImageData> img(*_dataContainer, _imageReader.p_targetImageID.getValue());
if (img != 0) {
_sliceExtractor.p_transferFunction.setImageHandle(img.getDataHandle());
}
......
......@@ -38,9 +38,11 @@ namespace campvis {
class CAMPVIS_MODULES_API SliceVis : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a SliceVis pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit SliceVis(DataContainer* dc);
explicit SliceVis(DataContainer& dc);
/**
* Virtual Destructor
......@@ -50,8 +52,6 @@ namespace campvis {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "SliceVis"; };
......
......@@ -32,8 +32,8 @@
namespace campvis {
VolumeExplorerDemo::VolumeExplorerDemo(DataContainer* dc)
: AutoEvaluationPipeline(dc)
VolumeExplorerDemo::VolumeExplorerDemo(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _lsp()
, _imageReader()
, _ve(&_canvasSize)
......
......@@ -38,9 +38,11 @@ namespace campvis {
class CAMPVIS_MODULES_API VolumeExplorerDemo : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a VolumeExplorerDemo pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit VolumeExplorerDemo(DataContainer* dc);
explicit VolumeExplorerDemo(DataContainer& dc);
/**
* Virtual Destructor
......@@ -54,7 +56,7 @@ namespace campvis {
virtual void deinit();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
virtual std::string getName() const { return getId(); };
/// \see AbstractPipeline::getId()
static const std::string getId() { return "VolumeExplorerDemo"; };
......
......@@ -32,8 +32,8 @@
namespace campvis {
VolumeRendererDemo::VolumeRendererDemo(DataContainer* dc)
: AutoEvaluationPipeline(dc)
VolumeRendererDemo::VolumeRendererDemo(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _tcp(&_canvasSize)
, _lsp()
, _imageReader()
......
......@@ -37,9 +37,11 @@ namespace campvis {
class CAMPVIS_MODULES_API VolumeRendererDemo : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a VolumeRendererDemopipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit VolumeRendererDemo(DataContainer* dc);
explicit VolumeRendererDemo(DataContainer& dc);
/**
* Virtual Destructor
......@@ -49,8 +51,6 @@ namespace campvis {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
/// \see AbstractPipeline::getId()
static const std::string getId() { return "VolumeRendererDemo"; };
......
......@@ -28,8 +28,8 @@
namespace campvis {
namespace workflowdemo {
ImageFiltering::ImageFiltering(DataContainer* dc)
: AutoEvaluationPipeline(dc)
ImageFiltering::ImageFiltering(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _lsp()
, _glCrop(&_canvasSize)
, _ve(&_canvasSize)
......
......@@ -38,9 +38,11 @@ namespace workflowdemo {
class CAMPVIS_MODULES_API ImageFiltering : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a ImageFiltering pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit ImageFiltering(DataContainer* dc);
explicit ImageFiltering(DataContainer& dataContainer);
/**
* Virtual Destructor
......@@ -50,8 +52,6 @@ namespace workflowdemo {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "WorkflowDemo::ImageFiltering"; };
......
......@@ -30,8 +30,8 @@
namespace campvis {
namespace workflowdemo {
ImageLoading::ImageLoading(DataContainer* dc)
: AutoEvaluationPipeline(dc)
ImageLoading::ImageLoading(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _imageReader()
{
addProcessor(&_imageReader);
......
......@@ -35,9 +35,11 @@ namespace workflowdemo {
class CAMPVIS_MODULES_API ImageLoading : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a ImageLoading pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit ImageLoading(DataContainer* dc);
explicit ImageLoading(DataContainer& dataContainer);
/**
* Virtual Destructor
......@@ -47,8 +49,6 @@ namespace workflowdemo {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "WorkflowDemo::ImageLoading"; };
campvis::GenericImageReader _imageReader;
......
......@@ -31,8 +31,8 @@
namespace campvis {
namespace workflowdemo {
ImageVis::ImageVis(DataContainer* dc)
: AutoEvaluationPipeline(dc)
ImageVis::ImageVis(DataContainer& dc)
: AutoEvaluationPipeline(dc, getId())
, _ve(&_canvasSize, new SliceExtractor(nullptr), new ContextPreservingRaycaster(nullptr))
{
addProcessor(&_ve);
......
......@@ -35,9 +35,11 @@ namespace workflowdemo {
class CAMPVIS_MODULES_API ImageVis : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
* Creates a ImageVis pipeline.
* \param dataContainer Reference to the DataContainer containing local working set of data
* for this pipeline, must be valid the whole lifetime of this pipeline.
*/
explicit ImageVis(DataContainer* dc);
explicit ImageVis(DataContainer& dc);
/**
* Virtual Destructor
......@@ -47,8 +49,6 @@ namespace workflowdemo {
/// \see AutoEvaluationPipeline::init()
virtual void init();
/// \see AbstractPipeline::getName()
virtual const std::string getName() const { return getId(); };
static const std::string getId() { return "WorkflowDemo::ImageVis"; };
......
......@@ -32,9 +32,9 @@ namespace workflowdemo {
DemoWorkflow::DemoWorkflow()
: AbstractWorkflow("DemoWorkflow")
{
_loaderPipeline = new ImageLoading(_dataContainer);
_filterPipeline = new ImageFiltering(_dataContainer);
_visPipeline = new ImageVis(_dataContainer);
_loaderPipeline = new ImageLoading(*_dataContainer);
_filterPipeline = new ImageFiltering(*_dataContainer);
_visPipeline = new ImageVis(*_dataContainer);
typedef std::vector< std::pair<AbstractPipeline*, bool> > VisVec;
typedef std::vector<AbstractProperty*> PropVec;
......
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