-
Notifications
You must be signed in to change notification settings - Fork 3
/
vtkVVPluginInterface.h
96 lines (76 loc) · 3.32 KB
/
vtkVVPluginInterface.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/*=========================================================================
Copyright (c) Kitware, Inc.
All rights reserved.
See Copyright.txt or http://www.kitware.com/VolViewCopyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
// .NAME vtkVVPluginInterface - a user interface panel.
// .SECTION Description
// A concrete implementation of a user interface panel.
// See vtkKWUserInterfacePanel for a more detailed description.
// .SECTION See Also
// vtkKWUserInterfacePanel vtkKWUserInterfaceManager
#ifndef __vtkVVPluginInterface_h
#define __vtkVVPluginInterface_h
#include "vtkVVUserInterfacePanel.h"
class vtkKWFrameWithLabel;
class vtkVVPluginSelector;
class vtkVVWindowBase;
class vtkKWRenderWidget;
class VTK_EXPORT vtkVVPluginInterface : public vtkVVUserInterfacePanel
{
public:
static vtkVVPluginInterface* New();
vtkTypeRevisionMacro(vtkVVPluginInterface,vtkVVUserInterfacePanel);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Create the interface objects.
virtual void Create();
// Description:
// Refresh the interface given the current value of the Window and its
// views/composites/widgets.
virtual void Update();
// Description:
// Access to some sub-widgets.
vtkGetObjectMacro(Plugins, vtkVVPluginSelector);
// Description:
// Get the id of the page in this user interface
vtkGetMacro(PageId, int);
// Description:
// Update the "enable" state of the object and its internal parts.
// Depending on different Ivars (this->Enabled, the application's
// Limited Edition Mode, etc.), the "enable" state of the object is updated
// and propagated to its internal parts/subwidgets. This will, for example,
// enable/disable parts of the widget UI, enable/disable the visibility
// of 3D widgets, etc.
virtual void UpdateEnableState();
// Description:
// UpdateAccordingToImageData() should be called once you know
// that the vtkImageData has been modified(). An alternative is to call
// the Update() of the display interface, but we are assuming that the
// plugin operation did not modify the views/volume property etc. So
// we can do faster than having to call Window->DisplayInterface->Update().
// We will just update the volume and image widgets as per the changed data.
virtual void UpdateAccordingToImageData();
// Description:
// Get some internal objects
vtkGetObjectMacro(PluginsFrame, vtkKWFrameWithLabel);
protected:
vtkVVPluginInterface();
~vtkVVPluginInterface();
// The datatype of the underlying image may have changed when running the
// plugin. This can wreck havoc with the paintbrush widgets, since these
// do a blending of the paintbrush with the underlying data - Hence if we
// switch the underlying data under the carpet, we need to do some magic.
void ReinstallPaintbrushWidgets(vtkKWRenderWidget *rw);
// Plugins
vtkKWFrameWithLabel *PluginsFrame;
vtkVVPluginSelector *Plugins;
int PageId;
private:
vtkVVPluginInterface(const vtkVVPluginInterface&); // Not implemented
void operator=(const vtkVVPluginInterface&); // Not Implemented
};
#endif