Slicer 5.9
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
Loading...
Searching...
No Matches
vtkMRMLVolumeRenderingWindowLevelWidget.h
Go to the documentation of this file.
1/*==============================================================================
2
3 Program: 3D Slicer
4
5 Copyright (c) Kitware Inc.
6
7 See COPYRIGHT.txt
8 or http://www.slicer.org/copyright/copyright.txt for details.
9
10 Unless required by applicable law or agreed to in writing, software
11 distributed under the License is distributed on an "AS IS" BASIS,
12 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 See the License for the specific language governing permissions and
14 limitations under the License.
15
16==============================================================================*/
17
27
28#ifndef vtkMRMLVolumeRenderingWindowLevelWidget_h
29#define vtkMRMLVolumeRenderingWindowLevelWidget_h
30
31#include "vtkSlicerVolumeRenderingModuleMRMLDisplayableManagerExport.h"
33
34// VTK includes
35#include <vtkCallbackCommand.h>
36#include <vtkSmartPointer.h>
37#include <vtkWeakPointer.h>
38
39class vtkMRMLViewNode;
43class vtkPiecewiseFunction;
44class vtkColorTransferFunction;
45
46class VTK_SLICER_VOLUMERENDERING_MODULE_MRMLDISPLAYABLEMANAGER_EXPORT vtkMRMLVolumeRenderingWindowLevelWidget : public vtkMRMLAbstractWidget
47{
48public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
55
58
60 bool CanProcessInteractionEvent(vtkMRMLInteractionEventData* eventData, double& distance2) override;
61
64
66 void Leave(vtkMRMLInteractionEventData* eventData) override;
67
69 enum
70 {
71 WidgetStateWindowLevelAdjust = WidgetStateUser, // Normal window/level adjustment mode
72 WidgetStateOpacityAdjust, // Ctrl+drag opacity adjustment mode
73 };
74
76 enum
77 {
80 };
81
82protected:
85
90
93
95 void AdjustVolumeRenderingTransferFunctions(vtkMRMLVolumePropertyNode* volumePropertyNode, double deltaX, double deltaY, int modifiers = 0);
96
97private:
99 void operator=(const vtkMRMLVolumeRenderingWindowLevelWidget&) = delete;
100
101 int StartEventPosition[2];
102 int PreviousEventPosition[2];
103
104 class vtkInternal;
105 vtkInternal* Internal;
106};
107
108#endif
@ WidgetStateUser
this is a starting index that can be used for widget-specific states
@ WidgetEventUser
this is a starting index that can be used for widget-specific events
MRML node to represent a 3D view.
vtkMRMLVolumePropertyNode contains the transfer functions (scalar opacity, color and gradient opacity...
static vtkMRMLVolumeRenderingWindowLevelWidget * New()
void ProcessAdjustTransferFunction(vtkMRMLInteractionEventData *eventData)
bool ProcessMouseMove(vtkMRMLInteractionEventData *eventData)
bool ProcessReset(vtkMRMLInteractionEventData *eventData)
void SetMRMLViewNode(vtkMRMLViewNode *viewNode)
Create the default widget representation.
bool CanProcessInteractionEvent(vtkMRMLInteractionEventData *eventData, double &distance2) override
Return true if the widget can process the interaction event.
bool ProcessAdjustTransferFunctionStart(vtkMRMLInteractionEventData *eventData)
void Leave(vtkMRMLInteractionEventData *eventData) override
Called when the widget loses input focus.
bool ProcessEndMouseDrag(vtkMRMLInteractionEventData *eventData)
void AdjustVolumeRenderingTransferFunctions(vtkMRMLVolumePropertyNode *volumePropertyNode, double deltaX, double deltaY, int modifiers=0)
Adjust transfer functions for a specific volume property node.
void PrintSelf(ostream &os, vtkIndent indent) override
bool ProcessStartMouseDrag(vtkMRMLInteractionEventData *eventData)
void SetVolumeRenderingDisplayableManager(vtkMRMLVolumeRenderingDisplayableManager *manager)
Set the volume rendering displayable manager.
bool ProcessInteractionEvent(vtkMRMLInteractionEventData *eventData) override
Process interaction event.