MeVisLab Toolbox Reference
Loading...
Searching...
No Matches
SoView2DRigidRegistrationEditor.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2016, 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// editor for setting a rigid registration with external undo handling
14
15#pragma once
16
18
19#include <SoSFMLBase.h>
20
21#include <mlUndoContext.h>
22#include <mlUndoStep.h>
23
25
26
29{
31 SO_NODE_HEADER(SoView2DRigidRegistrationEditor);
32
33public:
36
38 static void initClass();
39
42
43
44protected:
47
49 void pushOldState(const RegistrationState& state) override;
50
52 ml::UndoContextPtr _undoContext;
53
54 class UndoStep : public ml::UndoOnlyStep
55 {
56 public:
58
59 std::string description() const override;
60 void undo() override;
61
62 private:
64 {
65 return static_cast<SoView2DRigidRegistrationEditor*>(owner());
66 }
67
68 RegistrationState _state;
69 };
70};
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
The SoSFMLBase field is the interface used by Inventor nodes to output ML Base objects to the outside...
Definition SoSFMLBase.h:46
interactive editor to accumulate a transformation matrix
UndoStep(SoView2DRigidRegistrationEditor *owner, const RegistrationState &state)
std::string description() const override
gui grabber to accumulate a transformation matrix
ml::UndoContextPtr _undoContext
Reference to the current undo context.
SoSFMLBase inUndoContext
input for undo context for undo/redo handling
void pushOldState(const RegistrationState &state) override
inherited to implement undo handling
virtual void inUndoContextChanged(SoField *field)
called when inUndoContext field is touched:
static void initClass()
Initializes this class (called on dll initialization).
SoView2DRigidRegistrationEditor()
Constructor.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.