VTK  9.2.6
vtkResliceImageViewer.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkResliceImageViewer.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
33#ifndef vtkResliceImageViewer_h
34#define vtkResliceImageViewer_h
35
36#include "vtkImageViewer2.h"
37#include "vtkInteractionImageModule.h" // For export macro
38
44class vtkResliceImageViewerScrollCallback;
45class vtkPlane;
46
47class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
48{
49public:
51
56 void PrintSelf(ostream& os, vtkIndent indent) override;
58
62 void Render() override;
63
65
68 void SetInputData(vtkImageData* in) override;
71
73
76 void SetColorWindow(double s) override;
77 void SetColorLevel(double s) override;
79
81
85 vtkGetObjectMacro(ResliceCursorWidget, vtkResliceCursorWidget);
87
92 enum
93 {
94 RESLICE_AXIS_ALIGNED = 0,
95 RESLICE_OBLIQUE = 1
96 };
97
98 vtkGetMacro(ResliceMode, int);
99 virtual void SetResliceMode(int resliceMode);
101 {
103 }
105 {
106 this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
107 }
108
110
116
118
124
126
129 virtual void SetThickMode(int);
130 virtual int GetThickMode();
132
136 virtual void Reset();
137
139
142 vtkGetObjectMacro(PointPlacer, vtkBoundedPlanePointPlacer);
144
146
149 vtkGetObjectMacro(Measurements, vtkResliceImageViewerMeasurements);
151
153
156 vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
158
160
166 vtkSetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
167 vtkGetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
168 vtkBooleanMacro(SliceScrollOnMouseWheel, vtkTypeBool);
170
172
180 vtkSetMacro(SliceScrollFactor, double);
181 vtkGetMacro(SliceScrollFactor, double);
183
187 virtual void IncrementSlice(int inc);
188
189 enum
190 {
191 SliceChangedEvent = 1001
192 };
193
194protected:
197
198 void InstallPipeline() override;
199 void UnInstallPipeline() override;
200 void UpdateOrientation() override;
201 void UpdateDisplayExtent() override;
202 virtual void UpdatePointPlacer();
203
205
212
218 vtkResliceImageViewerScrollCallback* ScrollCallback;
219 double SliceScrollFactor = 1.0;
220
221private:
223 void operator=(const vtkResliceImageViewer&) = delete;
224};
225
226#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:34
perform various plane computations
Definition vtkPlane.h:34
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:69