VTK  9.0.1
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 
40 class vtkResliceCursor;
41 class vtkScalarsToColors;
44 class vtkResliceImageViewerScrollCallback;
45 class vtkPlane;
46 
47 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
48 {
49 public:
51 
54  static vtkResliceImageViewer* New();
56  void PrintSelf(ostream& os, vtkIndent indent) override;
58 
62  void Render() override;
63 
65 
68  void SetInputData(vtkImageData* in) override;
69  void SetInputConnection(vtkAlgorithmOutput* input) 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  {
102  this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED);
103  }
104  virtual void SetResliceModeToOblique()
105  {
106  this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
107  }
108 
110 
113  vtkResliceCursor* GetResliceCursor();
114  void SetResliceCursor(vtkResliceCursor* rc);
116 
118 
121  virtual void SetLookupTable(vtkScalarsToColors*);
122  vtkScalarsToColors* GetLookupTable();
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 
174  virtual void IncrementSlice(int n);
175 
176  enum
177  {
178  SliceChangedEvent = 1001
179  };
180 
181 protected:
183  ~vtkResliceImageViewer() override;
184 
185  void InstallPipeline() override;
186  void UnInstallPipeline() override;
187  void UpdateOrientation() override;
188  void UpdateDisplayExtent() override;
189  virtual void UpdatePointPlacer();
190 
192 
196  vtkPlane* GetReslicePlane();
197  double GetInterSliceSpacingInResliceMode();
199 
205  vtkResliceImageViewerScrollCallback* ScrollCallback;
206 
207 private:
209  void operator=(const vtkResliceImageViewer&) = delete;
210 };
211 
212 #endif
vtkBoundedPlanePointPlacer * PointPlacer
vtkResliceCursorWidget * ResliceCursorWidget
Display a 2D image.
virtual void SetResliceModeToOblique()
virtual void SetColorLevel(double s)
Set window and level for mapping pixels to colors.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void Render(void)
Render the resulting image.
virtual void SetInputData(vtkImageData *in)
Set/Get the input image to the viewer.
represent a reslice cursor
Proxy object to connect input/output ports.
virtual void SetColorWindow(double s)
Set window and level for mapping pixels to colors.
a placer that constrains a handle to a finite plane
int vtkTypeBool
Definition: vtkABI.h:69
Superclass for mapping scalar values to colors.
platform-independent render window interaction including picking and frame rate control.
Manage measurements on a resliced image.
virtual void InstallPipeline()
vtkResliceImageViewerMeasurements * Measurements
a simple class to control print indentation
Definition: vtkIndent.h:33
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
perform various plane computations
Definition: vtkPlane.h:31
virtual void UpdateOrientation()
virtual void SetInputConnection(vtkAlgorithmOutput *input)
Set/Get the input image to the viewer.
vtkResliceImageViewerScrollCallback * ScrollCallback
virtual void UnInstallPipeline()
static vtkImageViewer2 * New()
virtual void UpdateDisplayExtent()
Update the display extent manually so that the proper slice for the given orientation is displayed...
Display an image along with a reslice cursor.
virtual void SetResliceModeToAxisAligned()
Geometry for a reslice cursor.