Currently job artifacts in CI/CD pipelines on LRZ GitLab never expire. Starting from Wed 26.1.2022 the default expiration time will be 30 days (GitLab default). Currently existing artifacts in already completed jobs will not be affected by the change. The latest artifacts for all jobs in the latest successful pipelines will be kept. More information: https://gitlab.lrz.de/help/user/admin_area/settings/continuous_integration.html#default-artifacts-expiration

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

Added support for building campvis-modules as shared library:

* Added modules/modulesapi.h with CAMPVIS_MODULES_API definition (MSVC __declspec switch)
* Updated modules/CMakeLists.txt to allow shared build
* Added CAMPVIS_MODULES_API to every non-templated class definition in campvis-modules
parent 065d209c
......@@ -6,6 +6,7 @@ MESSAGE(STATUS "Configuring Campvis Modules")
WRITE_PIPELINE_REGISTRATION("gen_pipelineregistration.h")
LIST(APPEND CampvisModulesHeaders
modulesapi.h
gen_pipelineregistration.h
pipelinefactory.h
)
......@@ -16,7 +17,7 @@ LIST(APPEND CampvisModulesSources
LINK_DIRECTORIES(${CampvisGlobalLinkDirectories} ${CampvisModulesLinkDirectories})
ADD_LIBRARY(campvis-modules ${CampvisSharedStaticModulesFix}
ADD_LIBRARY(campvis-modules
${CampvisModulesSources} ${CampvisModulesHeaders}
)
......@@ -24,6 +25,10 @@ ADD_DEFINITIONS(${CampvisGlobalDefinitions} ${CampvisModulesDefinitions})
INCLUDE_DIRECTORIES(${CampvisGlobalIncludeDirs} ${CampvisModulesIncludeDirs})
TARGET_LINK_LIBRARIES(campvis-modules campvis-core cgt sigslot ${CampvisGlobalExternalLibs} ${CampvisModulesExternalLibs})
# if campvis-core is built as a shared library, CMake will define the following flag to instruct
# the code to export DLL symbols
SET_TARGET_PROPERTIES(campvis-modules PROPERTIES DEFINE_SYMBOL "CAMPVIS_MODULES_BUILD_DLL")
IF(CAMPVIS_GROUP_SOURCE_FILES)
DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisModulesSources ${CampvisHome} "")
DEFINE_SOURCE_GROUPS_FROM_SUBDIR(CampvisModulesHeaders ${CampvisHome} "")
......
......@@ -29,6 +29,8 @@
#include "core/properties/genericproperty.h"
#include "core/properties/metaproperty.h"
#include "modules/modulesapi.h"
#include <string>
namespace cgt {
......@@ -37,7 +39,7 @@ namespace cgt {
namespace campvis {
class AbstractPointPredicate : public MetaProperty {
class CAMPVIS_MODULES_API AbstractPointPredicate : public MetaProperty {
public:
// class AbstractColorModulationDecorator {
// public:
......@@ -135,7 +137,7 @@ namespace campvis {
// ================================================================================================
class AndCombinedPointPredicate : public AbstractPointPredicate {
class CAMPVIS_MODULES_API AndCombinedPointPredicate : public AbstractPointPredicate {
public:
AndCombinedPointPredicate(const std::string& name, const std::string& title, const std::vector<AbstractPointPredicate*>& predicates);
......@@ -152,7 +154,7 @@ namespace campvis {
// ================================================================================================
class OrCombinedPointPredicate : public AbstractPointPredicate {
class CAMPVIS_MODULES_API OrCombinedPointPredicate : public AbstractPointPredicate {
public:
OrCombinedPointPredicate(const std::string& name, const std::string& title, const std::vector<AbstractPointPredicate*>& predicates);
......@@ -169,7 +171,7 @@ namespace campvis {
// ================================================================================================
class RangePointPredicate : public AbstractPointPredicate {
class CAMPVIS_MODULES_API RangePointPredicate : public AbstractPointPredicate {
public:
RangePointPredicate(const std::string& inputVariable, const std::string& name, const std::string& title);
......@@ -191,7 +193,7 @@ namespace campvis {
// ================================================================================================
class LabelBitPointPredicate : public AbstractPointPredicate {
class CAMPVIS_MODULES_API LabelBitPointPredicate : public AbstractPointPredicate {
public:
LabelBitPointPredicate(const std::string& inputVariable, const std::string& name, const std::string& title);
......
......@@ -26,6 +26,7 @@
#include "sigslot/sigslot.h"
#include "modules/modulesapi.h"
#include "modules/advancedusvis/datastructures/pointpredicate.h"
#include <vector>
......@@ -35,7 +36,7 @@ namespace campvis {
/**
* Data object storing information about selected predicates and their settings.
*/
class PointPredicateHistogram : public sigslot::has_slots {
class CAMPVIS_MODULES_API PointPredicateHistogram : public sigslot::has_slots {
public:
/**
......
......@@ -27,13 +27,16 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/advancedusfusion.h"
#include "modules/preprocessing/processors/glgaussianfilter.h"
#include "modules/vis/processors/quadview.h"
namespace campvis {
class AdvancedUsVis : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API AdvancedUsVis : public AutoEvaluationPipeline {
public:
/**
* Creates a VisualizationPipeline.
......@@ -71,6 +74,9 @@ namespace campvis {
QuadView _quadView;
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<AdvancedUsVis>;
}
#endif // ADVANCEDUSVIS_H__
......@@ -27,17 +27,18 @@
#include "core/datastructures/imagerepresentationlocal.h"
#include "core/pipeline/autoevaluationpipeline.h"
#include "core/properties/allproperties.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/devil/processors/devilimagereader.h"
#include "modules/advancedusvis/processors/advancedusfusion.h"
#include "modules/preprocessing/processors/glgaussianfilter.h"
#include "modules/randomwalk/processors/confidencemapgenerator.h"
#include "core/properties/buttonproperty.h"
#include "core/properties/genericproperty.h"
#include "core/properties/stringproperty.h"
namespace campvis {
class CmBatchGeneration : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API CmBatchGeneration : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -90,6 +91,9 @@ namespace campvis {
ButtonProperty p_execute;
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<CmBatchGeneration>;
}
#endif // CMBATCHGENERATION_H__
......@@ -27,6 +27,9 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -44,7 +47,7 @@
namespace campvis {
class PredicateDemoAchilles : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API PredicateDemoAchilles : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -90,6 +93,9 @@ namespace campvis {
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<PredicateDemoAchilles>;
}
#endif // PredicateDemoAchilles_H__
......@@ -28,6 +28,9 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -45,7 +48,7 @@
namespace campvis {
class PredicateDemoCarotid : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API PredicateDemoCarotid : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -92,6 +95,9 @@ namespace campvis {
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<PredicateDemoCarotid>;
}
#endif // PREDICATEDEMOCAROTID_H__
......@@ -28,6 +28,9 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -45,7 +48,7 @@
namespace campvis {
class PredicateDemoCarotid2 : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API PredicateDemoCarotid2 : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -92,6 +95,9 @@ namespace campvis {
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<PredicateDemoCarotid2>;
}
#endif // PredicateDemoCarotid22_H__
......@@ -27,6 +27,9 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -44,7 +47,7 @@
namespace campvis {
class PredicateDemoShoulder : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API PredicateDemoShoulder : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -90,6 +93,9 @@ namespace campvis {
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<PredicateDemoShoulder>;
}
#endif // PREDICATEDEMOSHOULDER_H__
......@@ -27,6 +27,9 @@
#include "core/pipeline/autoevaluationpipeline.h"
#include "modules/modulesapi.h"
#include "modules/pipelinefactory.h"
#include "modules/base/processors/lightsourceprovider.h"
#include "modules/io/processors/mhdimagereader.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -44,7 +47,7 @@
namespace campvis {
class PredicateDemoSmallHeart : public AutoEvaluationPipeline {
class CAMPVIS_MODULES_API PredicateDemoSmallHeart : public AutoEvaluationPipeline {
public:
/**
* Creates a AutoEvaluationPipeline.
......@@ -91,6 +94,8 @@ namespace campvis {
};
// Instantiate template to register the pipelines.
template class PipelineRegistrar<PredicateDemoSmallHeart>;
}
#endif // PREDICATEDEMOSMALLHEART_H__
......@@ -36,6 +36,8 @@
#include "core/properties/optionproperty.h"
#include "core/properties/transferfunctionproperty.h"
#include "modules/modulesapi.h"
namespace cgt {
class Shader;
}
......@@ -46,7 +48,7 @@ namespace campvis {
/**
* Extracts a slice from a 3D image and renders it into a rendertarget.
*/
class AdvancedUsFusion : public VisualizationProcessor, public HasProcessorDecorators {
class CAMPVIS_MODULES_API AdvancedUsFusion : public VisualizationProcessor, public HasProcessorDecorators {
public:
/**
* Constructs a new AdvancedUsFusion Processor
......
......@@ -31,6 +31,7 @@
#include "core/pipeline/visualizationprocessor.h"
#include "core/properties/allproperties.h"
#include "modules/modulesapi.h"
#include "modules/advancedusvis/properties/pointpredicatehistogramproperty.h"
namespace cgt {
......@@ -43,7 +44,7 @@ namespace campvis {
/**
* Evaluates the Point Predicate Histogram and stores the results in a bitmask image.
*/
class PointPredicateEvaluator : public VisualizationProcessor {
class CAMPVIS_MODULES_API PointPredicateEvaluator : public VisualizationProcessor {
public:
/**
* Constructs a new PointPredicateEvaluator Processor
......
......@@ -29,6 +29,7 @@
#include "core/properties/floatingpointproperty.h"
#include "core/properties/genericproperty.h"
#include "modules/modulesapi.h"
#include "modules/advancedusvis/properties/pointpredicatehistogramproperty.h"
#include <string>
......@@ -41,7 +42,7 @@ namespace campvis {
/**
* Performs a predicate-based volume ray casting.
*/
class PointPredicateRaycaster : public RaycastingProcessor {
class CAMPVIS_MODULES_API PointPredicateRaycaster : public RaycastingProcessor {
public:
/**
* Constructs a new PointPredicateRaycaster Processor
......
......@@ -25,6 +25,7 @@
#ifndef PREDICATEVOLUMEEXPLORER_H__
#define PREDICATEVOLUMEEXPLORER_H__
#include "modules/modulesapi.h"
#include "modules/vis/processors/volumeexplorer.h"
#include "modules/advancedusvis/processors/pointpredicateraycaster.h"
#include "modules/advancedusvis/processors/pointpredicateevaluator.h"
......@@ -34,7 +35,7 @@ namespace campvis {
/**
* Combines a volume raycaster and 3 slice views for explorative volume visualization.
*/
class PredicateVolumeExplorer : public VolumeExplorer {
class CAMPVIS_MODULES_API PredicateVolumeExplorer : public VolumeExplorer {
/// voxel type of the bitmask image (hardcoding this is not the most beautiful design though...)
typedef uint8_t BitmaskType;
......
......@@ -37,6 +37,8 @@
#include "core/properties/optionproperty.h"
#include "core/properties/transferfunctionproperty.h"
#include "modules/modulesapi.h"
namespace cgt {
class Shader;
}
......@@ -47,7 +49,7 @@ namespace campvis {
/**
* Computes the intensity distribution profile for each voxel along the scanline.
*/
class ScanlineDistributionComputation : public VisualizationProcessor {
class CAMPVIS_MODULES_API ScanlineDistributionComputation : public VisualizationProcessor {
public:
/**
* Constructs a new ScanlineDistributionComputation Processor
......
......@@ -27,6 +27,8 @@
#include "core/properties/abstractproperty.h"
#include "modules/modulesapi.h"
#include "modules/advancedusvis/datastructures/pointpredicatehistogram.h"
#include <tbb/atomic.h>
......@@ -45,7 +47,7 @@ namespace campvis {
* others, they will share the pointer (instead of copying around as with other properties)!
* Therefore, we use a std::shared_ptr.
*/
class PointPredicateHistogramProperty : public AbstractProperty, public sigslot::has_slots {
class CAMPVIS_MODULES_API PointPredicateHistogramProperty : public AbstractProperty, public sigslot::has_slots {
public:
/**
* Creates a new PointPredicateHistogramProperty
......
......@@ -40,11 +40,13 @@
#include "core/properties/floatingpointproperty.h"
#include "core/properties/optionproperty.h"
#include "modules/modulesapi.h"
namespace campvis {
/**
* Generates CameraData objects.
*/
class CameraProvider : public AbstractProcessor {
class CAMPVIS_MODULES_API CameraProvider : public AbstractProcessor {
public:
/**
* Constructs a new CameraProvider Processor
......
......@@ -31,12 +31,14 @@
#include "core/properties/datanameproperty.h"
#include "core/properties/floatingpointproperty.h"
#include "modules/modulesapi.h"
namespace campvis {
/**
* Creates LightSourceData and stores it in the DataContainer.
* \see LightSourceData
*/
class LightSourceProvider : public AbstractProcessor {
class CAMPVIS_MODULES_API LightSourceProvider : public AbstractProcessor {
public:
/**
* Constructs a new LightSourceProvider Processor.
......
......@@ -34,6 +34,7 @@
#include "core/pipeline/abstractprocessor.h"
#include "core/properties/allproperties.h"
#include "modules/modulesapi.h"
namespace campvis {
/**
......@@ -58,7 +59,7 @@ namespace campvis {
* to compute the "ProbeToReference" matrix. If an additional calibration matrix is needed, this can be achieved by
* adding a new MatrixProcessor that multiplies a hardcoded calibration matrix to the result or the inputs.
*/
class MatrixProcessor : public AbstractProcessor {
class CAMPVIS_MODULES_API MatrixProcessor : public AbstractProcessor {
public:
enum SourceType {
FIXED = 0,
......
......@@ -34,6 +34,8 @@
#include "cgt/bounds.h"
#include "cgt/event/eventlistener.h"
#include "cgt/navigation/trackball.h"
#include "modules/modulesapi.h"
#include "modules/base/processors/cameraprovider.h"
namespace cgt {
......@@ -46,7 +48,7 @@ namespace campvis {
/**
* Generates CameraData objects.
*/
class TrackballCameraProvider : public CameraProvider, public cgt::EventListener, public cgt::IHasCamera {
class CAMPVIS_MODULES_API TrackballCameraProvider : public CameraProvider, public cgt::EventListener, public cgt::IHasCamera {
public:
/// Trackball automation mode
enum AutomationMode {
......
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