The expiration time for new job artifacts in CI/CD pipelines is now 30 days (GitLab default). Previously generated 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 961b032c authored by Christian Schulte zu Berge's avatar Christian Schulte zu Berge
Browse files

Work on VolumeExplorer:

The VolumeExplorer has now an additional property defining which view is shown in the big section (and which in the three small sections). Hence, now it is also possible to show one of the slice views in large and have the volume rendering in small.
parent b7817eb2
......@@ -82,6 +82,7 @@ namespace campvis {
void TrackballNavigationEventListener::onEvent(tgt::Event* e) {
if (typeid(*e) == typeid(tgt::MouseEvent)) {
tgt::MouseEvent* me = static_cast<tgt::MouseEvent*>(e);
_trackball->setViewprtSize(me->viewport());
if (me->action() == tgt::MouseEvent::PRESSED) {
for (std::vector<VisualizationProcessor*>::iterator it = _lqModeProcessors.begin(); it != _lqModeProcessors.end(); ++it)
(*it)->p_lqMode.setValue(true);
......@@ -167,4 +168,13 @@ namespace campvis {
}
}
void TrackballNavigationEventListener::setViewportSizeProperty(IVec2Property* viewportSizeProp) {
_viewportSizeProp->s_changed.disconnect(this);
tgtAssert(viewportSizeProp != nullptr, "The property must not be 0.");
_viewportSizeProp = viewportSizeProp;
onViewportSizePropChanged(_viewportSizeProp);
_viewportSizeProp->s_changed.connect(this, &TrackballNavigationEventListener::onViewportSizePropChanged);
}
}
......@@ -100,6 +100,11 @@ namespace campvis {
virtual void onEvent(tgt::Event* e);
/**
* Sets the property defining the viewport size.
* \param viewportSizeProp The new property defining the viewport size, must not be 0.
*/
void setViewportSizeProperty(IVec2Property* viewportSizeProp);
/**
* Reinitializes the camera using the data in \a hwb.
......
This diff is collapsed.
......@@ -53,6 +53,14 @@ namespace campvis {
*/
class VolumeExplorer : public VisualizationProcessor, public HasProcessorDecorators, public tgt::EventListener {
public:
/// Enumeration of the 4 views of the VolumeExplorer
enum Views {
XY_PLANE,
XZ_PLANE,
YZ_PLANE,
VOLUME
};
/**
* Constructs a new VolumeExplorer Processor
* \param viewportSizeProp Pointer to the property defining the viewport size, must not be 0.
......@@ -86,6 +94,7 @@ namespace campvis {
DataNameProperty p_inputVolume; ///< image ID for first input image
DataNameProperty p_outputImage; ///< image ID for output image
GenericOptionProperty<Views> p_largeView; ///< View to be shown in the large render target
BoolProperty p_enableScribbling; ///< Enable Scribbling in Slice Views
MetaProperty p_seProperties; ///< MetaProperty for SliceExtractor properties
......@@ -99,6 +108,7 @@ namespace campvis {
VR_INVALID = FIRST_FREE_TO_USE_INVALIDATION_LEVEL,
SLICES_INVALID = FIRST_FREE_TO_USE_INVALIDATION_LEVEL << 1,
SCRIBBLE_INVALID = FIRST_FREE_TO_USE_INVALIDATION_LEVEL << 2,
LARGE_VIEW_INVALID = FIRST_FREE_TO_USE_INVALIDATION_LEVEL << 3
};
/// \see AbstractProcessor::updateResult
......@@ -133,8 +143,8 @@ namespace campvis {
VolumeRenderer _raycaster;
SliceRenderProcessor* _sliceRenderer;
IVec2Property p_sliceRenderSize;
IVec2Property p_volumeRenderSize;
IVec2Property p_smallRenderSize;
IVec2Property p_largeRenderSize;
MWheelToNumericPropertyEventListener _xSliceHandler;
......@@ -144,10 +154,16 @@ namespace campvis {
TrackballNavigationEventListener* _trackballEH;
bool _mousePressedInRaycaster; ///< Flag whether mouse was pressed in raycaster
Views _viewUnderEvent; ///< View to apply events to
tgt::ivec2 _eventPositionOffset; ///< Offset to be added to mouse event position
tgt::ivec2 _eventViewportSize; ///< Viewport of adjusted mouse event
std::vector<tgt::vec3>* _scribblePointer; ///< Pointer encoding whether the mouse was pressed (!= nullptr) and whether we have yes-scribbles or no-scribbles.
std::vector<tgt::vec3> _yesScribbles; ///< All voxels of the current yes-scribbles
std::vector<tgt::vec3> _noScribbles; ///< All voxels of the current no-scribbles
tgt::ivec3 _cachedImageSize;
static const std::string loggerCat_;
};
......
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