VTK  9.2.20230207
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 =========================================================================*/
36 #ifndef vtkResliceImageViewer_h
37 #define vtkResliceImageViewer_h
38 
39 #include "vtkImageViewer2.h"
40 #include "vtkInteractionImageModule.h" // For export macro
41 
42 VTK_ABI_NAMESPACE_BEGIN
44 class vtkResliceCursor;
45 class vtkScalarsToColors;
48 class vtkResliceImageViewerScrollCallback;
49 class vtkPlane;
50 
51 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
52 {
53 public:
55 
60  void PrintSelf(ostream& os, vtkIndent indent) override;
62 
66  void Render() override;
67 
69 
72  void SetInputData(vtkImageData* in) override;
73  void SetInputConnection(vtkAlgorithmOutput* input) override;
75 
77 
80  void SetColorWindow(double s) override;
81  void SetColorLevel(double s) override;
83 
85 
89  vtkGetObjectMacro(ResliceCursorWidget, vtkResliceCursorWidget);
91 
96  enum
97  {
98  RESLICE_AXIS_ALIGNED = 0,
99  RESLICE_OBLIQUE = 1
100  };
101 
102  vtkGetMacro(ResliceMode, int);
103  virtual void SetResliceMode(int resliceMode);
105  {
106  this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED);
107  }
108  virtual void SetResliceModeToOblique()
109  {
110  this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
111  }
112 
114 
120 
122 
128 
130 
133  virtual void SetThickMode(int);
134  virtual int GetThickMode();
136 
140  virtual void Reset();
141 
143 
146  vtkGetObjectMacro(PointPlacer, vtkBoundedPlanePointPlacer);
148 
150 
153  vtkGetObjectMacro(Measurements, vtkResliceImageViewerMeasurements);
155 
157 
160  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
162 
164 
170  vtkSetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
171  vtkGetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
172  vtkBooleanMacro(SliceScrollOnMouseWheel, vtkTypeBool);
174 
176 
184  vtkSetMacro(SliceScrollFactor, double);
185  vtkGetMacro(SliceScrollFactor, double);
187 
191  virtual void IncrementSlice(int inc);
192 
193  enum
194  {
195  SliceChangedEvent = 1001
196  };
197 
198 protected:
201 
202  void InstallPipeline() override;
203  void UnInstallPipeline() override;
204  void UpdateOrientation() override;
205  void UpdateDisplayExtent() override;
206  virtual void UpdatePointPlacer();
207 
209 
216 
222  vtkResliceImageViewerScrollCallback* ScrollCallback;
223  double SliceScrollFactor = 1.0;
224 
225 private:
227  void operator=(const vtkResliceImageViewer&) = delete;
228 };
229 
230 VTK_ABI_NAMESPACE_END
231 #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
Definition: vtkImageData.h:164
Display a 2D image.
a simple class to control print indentation
Definition: vtkIndent.h:120
perform various plane computations
Definition: vtkPlane.h:147
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.
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.
static vtkResliceImageViewer * New()
Standard VTK methods.
virtual void SetResliceModeToOblique()
void Render() override
Render the resulting image.
void SetColorLevel(double s) override
Set window and level for mapping pixels to colors.
vtkResliceImageViewerScrollCallback * ScrollCallback
vtkPlane * GetReslicePlane()
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mod...
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.
virtual void IncrementSlice(int inc)
Increment/Decrement slice by 'inc' slices.
vtkResliceCursor * GetResliceCursor()
Set/Get the reslice cursor.
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
void UnInstallPipeline() override
void SetInputConnection(vtkAlgorithmOutput *input) override
Set/Get the input image to the viewer.
virtual void UpdatePointPlacer()
vtkScalarsToColors * GetLookupTable()
Set the lookup table.
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:71