MeVisLab Toolbox Reference
SoCSOGeneralRendererEditorExtension.h
Go to the documentation of this file.
1 /*************************************************************************************
2 **
3 ** Copyright 2012, MeVis Medical Solutions AG
4 **
5 ** The user may use this file in accordance with the license agreement provided with
6 ** the Software or, alternatively, in accordance with the terms contained in a
7 ** written agreement between the user and MeVis Medical Solutions AG.
8 **
9 ** For further information use the contact form at https://www.mevislab.de/contact
10 **
11 **************************************************************************************/
12 
13 
15 
16 #pragma once
17 
18 #include "SoCSOEditorExtension.h"
19 
20 
22 
23 namespace ml
24 {
25  class CSOList;
26  class CSO;
27 }
28 
30 
32 
35 {
36  SO_NODE_ABSTRACT_HEADER(SoCSOGeneralRendererEditorExtension);
37 
38 public:
39 
41  static void initClass();
42 
43  virtual void draw(const CSODrawCSOInfos&, const CSODrawView2DInfos&, const std::vector<CSODrawSliceInformation>&, SoView2DCSOExtensibleEditor*) = 0;
44 
45  void createStartPressAt(const SoPointerPosition& ) override {}
46  void createDragMoveTo(const SoPointerPosition& ) override {}
47  // returns whether to continue with this action
48  bool createEndPress(int ) override { return false; }
50 
51  void selectAndMoveStartPressAt(const SoPointerPosition& ) override {}
52  void selectAndMoveDragMoveTo(const SoPointerPosition& ) override {}
53  SoPointingAction* selectAndMoveEndPress(int ) override { return nullptr; }
54 
55  SoSFEnum colorMode;
56  SoSFColor generalColor;
57  SoSFFloat generalAlpha;
58 
59 protected:
60 
63 
64  bool shouldShowCSO(ml::CSO* cso, const CSODrawView2DInfos& view2DInfos, SoView2DCSOExtensibleEditor* editor);
65 
66  void glSetColor(ml::CSO* cso);
67 };
68 
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
Base class for an editor extension for the SoView2DCSOExtensibleEditor.
Base class for extensions that render all CSOs of a CSOList.
virtual void draw(const CSODrawCSOInfos &, const CSODrawView2DInfos &, const std::vector< CSODrawSliceInformation > &, SoView2DCSOExtensibleEditor *)=0
void pointerPositionIfAllowedAt(const SoPointerPosition &) override
Sets seed points while moving the mouse – but not while dragging.
void createDragMoveTo(const SoPointerPosition &) override
SoPointingAction * selectAndMoveEndPress(int) override
void selectAndMoveStartPressAt(const SoPointerPosition &) override
void selectAndMoveDragMoveTo(const SoPointerPosition &) override
SoCSOGeneralRendererEditorExtension()
Hidden constructor.
void createStartPressAt(const SoPointerPosition &) override
static void initClass()
init class in inventor runtime
bool shouldShowCSO(ml::CSO *cso, const CSODrawView2DInfos &view2DInfos, SoView2DCSOExtensibleEditor *editor)
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
The CSO represents a contour segmentation object.
Definition: CSO.h:44
Main documentation file for ML users and developers.
Definition: SoSFMLImage.h:51