VTK  9.3.0
vtkResliceImageViewer.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
21#ifndef vtkResliceImageViewer_h
22#define vtkResliceImageViewer_h
23
24#include "vtkImageViewer2.h"
25#include "vtkInteractionImageModule.h" // For export macro
26
27VTK_ABI_NAMESPACE_BEGIN
33class vtkResliceImageViewerScrollCallback;
34class vtkPlane;
35
36class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
37{
38public:
40
45 void PrintSelf(ostream& os, vtkIndent indent) override;
47
51 void Render() override;
52
54
57 void SetInputData(vtkImageData* in) override;
60
62
65 void SetColorWindow(double s) override;
66 void SetColorLevel(double s) override;
68
70
74 vtkGetObjectMacro(ResliceCursorWidget, vtkResliceCursorWidget);
76
81 enum
82 {
83 RESLICE_AXIS_ALIGNED = 0,
84 RESLICE_OBLIQUE = 1
85 };
86
87 vtkGetMacro(ResliceMode, int);
88 virtual void SetResliceMode(int resliceMode);
90 {
92 }
94 {
95 this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
96 }
97
99
105
107
113
115
118 virtual void SetThickMode(int);
119 virtual int GetThickMode();
121
125 virtual void Reset();
126
128
131 vtkGetObjectMacro(PointPlacer, vtkBoundedPlanePointPlacer);
133
135
138 vtkGetObjectMacro(Measurements, vtkResliceImageViewerMeasurements);
140
142
145 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
147
149
155 vtkSetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
156 vtkGetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
157 vtkBooleanMacro(SliceScrollOnMouseWheel, vtkTypeBool);
159
161
169 vtkSetMacro(SliceScrollFactor, double);
170 vtkGetMacro(SliceScrollFactor, double);
172
176 virtual void IncrementSlice(int inc);
177
178 enum
179 {
180 SliceChangedEvent = 1001
181 };
182
183protected:
186
187 void InstallPipeline() override;
188 void UnInstallPipeline() override;
189 void UpdateOrientation() override;
190 void UpdateDisplayExtent() override;
191 virtual void UpdatePointPlacer();
192
194
201
207 vtkResliceImageViewerScrollCallback* ScrollCallback;
208 double SliceScrollFactor = 1.0;
209
210private:
212 void operator=(const vtkResliceImageViewer&) = delete;
213};
214
215VTK_ABI_NAMESPACE_END
216#endif
Proxy object to connect input/output ports.
a placer that constrains a handle to a finite plane
topologically and geometrically regular array of data
Display a 2D image.
a simple class to control print indentation
Definition vtkIndent.h:29
perform various plane computations
Definition vtkPlane.h:26
platform-independent render window interaction including picking and frame rate control.
represent a reslice cursor
Geometry for a reslice cursor.
Manage measurements on a resliced image.
Display an image along with a reslice cursor.
void UpdateOrientation() override
void SetColorWindow(double s) override
Set window and level for mapping pixels to colors.
static vtkResliceImageViewer * New()
Standard VTK methods.
vtkResliceCursorWidget * ResliceCursorWidget
void SetInputData(vtkImageData *in) override
Set/Get the input image to the viewer.
virtual void SetResliceModeToAxisAligned()
virtual int GetThickMode()
Switch to / from thick mode.
virtual void SetResliceModeToOblique()
void Render() override
Render the resulting image.
void SetColorLevel(double s) override
Set window and level for mapping pixels to colors.
vtkPlane * GetReslicePlane()
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mod...
vtkResliceImageViewerScrollCallback * ScrollCallback
vtkBoundedPlanePointPlacer * PointPlacer
~vtkResliceImageViewer() override
void PrintSelf(ostream &os, vtkIndent indent) override
Standard VTK methods.
double GetInterSliceSpacingInResliceMode()
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mod...
virtual void Reset()
Reset all views back to initial state.
void SetResliceCursor(vtkResliceCursor *rc)
Set/Get the reslice cursor.
void UpdateDisplayExtent() override
Update the display extent manually so that the proper slice for the given orientation is displayed.
vtkScalarsToColors * GetLookupTable()
Set the lookup table.
virtual void IncrementSlice(int inc)
Increment/Decrement slice by 'inc' slices.
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
void UnInstallPipeline() override
void SetInputConnection(vtkAlgorithmOutput *input) override
Set/Get the input image to the viewer.
vtkResliceCursor * GetResliceCursor()
Set/Get the reslice cursor.
virtual void UpdatePointPlacer()
vtkResliceImageViewerMeasurements * Measurements
void InstallPipeline() override
virtual void SetThickMode(int)
Switch to / from thick mode.
virtual void SetResliceMode(int resliceMode)
Superclass for mapping scalar values to colors.
int vtkTypeBool
Definition vtkABI.h:64