VTK  9.0.20200604
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 
43 class vtkResliceCursor;
44 class vtkScalarsToColors;
47 class vtkResliceImageViewerScrollCallback;
48 class vtkPlane;
49 
50 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
51 {
52 public:
54 
57  static vtkResliceImageViewer* New();
59  void PrintSelf(ostream& os, vtkIndent indent) override;
61 
65  void Render() override;
66 
68 
71  void SetInputData(vtkImageData* in) override;
72  void SetInputConnection(vtkAlgorithmOutput* input) override;
74 
76 
79  void SetColorWindow(double s) override;
80  void SetColorLevel(double s) override;
82 
84 
88  vtkGetObjectMacro(ResliceCursorWidget, vtkResliceCursorWidget);
90 
95  enum
96  {
97  RESLICE_AXIS_ALIGNED = 0,
98  RESLICE_OBLIQUE = 1
99  };
100 
101  vtkGetMacro(ResliceMode, int);
102  virtual void SetResliceMode(int resliceMode);
104  {
105  this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED);
106  }
107  virtual void SetResliceModeToOblique()
108  {
109  this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
110  }
111 
113 
116  vtkResliceCursor* GetResliceCursor();
117  void SetResliceCursor(vtkResliceCursor* rc);
119 
121 
124  virtual void SetLookupTable(vtkScalarsToColors*);
125  vtkScalarsToColors* GetLookupTable();
127 
129 
132  virtual void SetThickMode(int);
133  virtual int GetThickMode();
135 
139  virtual void Reset();
140 
142 
145  vtkGetObjectMacro(PointPlacer, vtkBoundedPlanePointPlacer);
147 
149 
152  vtkGetObjectMacro(Measurements, vtkResliceImageViewerMeasurements);
154 
156 
159  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
161 
163 
169  vtkSetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
170  vtkGetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
171  vtkBooleanMacro(SliceScrollOnMouseWheel, vtkTypeBool);
173 
177  virtual void IncrementSlice(int inc);
178 
179  enum
180  {
181  SliceChangedEvent = 1001
182  };
183 
184 protected:
186  ~vtkResliceImageViewer() override;
187 
188  void InstallPipeline() override;
189  void UnInstallPipeline() override;
190  void UpdateOrientation() override;
191  void UpdateDisplayExtent() override;
192  virtual void UpdatePointPlacer();
193 
195 
199  vtkPlane* GetReslicePlane();
200  double GetInterSliceSpacingInResliceMode();
202 
208  vtkResliceImageViewerScrollCallback* ScrollCallback;
209 
210 private:
212  void operator=(const vtkResliceImageViewer&) = delete;
213 };
214 
215 #endif
vtkResliceImageViewer::RESLICE_OBLIQUE
Definition: vtkResliceImageViewer.h:98
vtkPlane
perform various plane computations
Definition: vtkPlane.h:31
vtkImageViewer2.h
vtkBoundedPlanePointPlacer
a placer that constrains a handle to a finite plane
Definition: vtkBoundedPlanePointPlacer.h:37
vtkResliceImageViewer::ResliceCursorWidget
vtkResliceCursorWidget * ResliceCursorWidget
Definition: vtkResliceImageViewer.h:203
vtkImageViewer2::Render
virtual void Render(void)
Render the resulting image.
vtkResliceCursorWidget
represent a reslice cursor
Definition: vtkResliceCursorWidget.h:53
vtkImageViewer2::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceImageViewer::ScrollCallback
vtkResliceImageViewerScrollCallback * ScrollCallback
Definition: vtkResliceImageViewer.h:208
vtkImageViewer2::SetInputConnection
virtual void SetInputConnection(vtkAlgorithmOutput *input)
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:43
vtkImageViewer2
Display a 2D image.
Definition: vtkImageViewer2.h:75
vtkResliceImageViewer::Measurements
vtkResliceImageViewerMeasurements * Measurements
Definition: vtkResliceImageViewer.h:206
vtkImageViewer2::UnInstallPipeline
virtual void UnInstallPipeline()
vtkResliceImageViewerMeasurements
Manage measurements on a resliced image.
Definition: vtkResliceImageViewerMeasurements.h:45
vtkResliceImageViewer::ResliceMode
int ResliceMode
Definition: vtkResliceImageViewer.h:205
vtkResliceImageViewer::SetResliceModeToAxisAligned
virtual void SetResliceModeToAxisAligned()
Definition: vtkResliceImageViewer.h:103
vtkResliceImageViewer::RESLICE_AXIS_ALIGNED
Definition: vtkResliceImageViewer.h:97
vtkImageViewer2::New
static vtkImageViewer2 * New()
vtkImageViewer2::InstallPipeline
virtual void InstallPipeline()
vtkImageViewer2::UpdateOrientation
virtual void UpdateOrientation()
vtkResliceImageViewer::SliceScrollOnMouseWheel
vtkTypeBool SliceScrollOnMouseWheel
Definition: vtkResliceImageViewer.h:207
vtkResliceImageViewer::SetResliceModeToOblique
virtual void SetResliceModeToOblique()
Definition: vtkResliceImageViewer.h:107
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:41
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:33
vtkImageViewer2::SetInputData
virtual void SetInputData(vtkImageData *in)
Set/Get the input image to the viewer.
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:59
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkImageViewer2::UpdateDisplayExtent
virtual void UpdateDisplayExtent()
Update the display extent manually so that the proper slice for the given orientation is displayed.
vtkResliceImageViewer::PointPlacer
vtkBoundedPlanePointPlacer * PointPlacer
Definition: vtkResliceImageViewer.h:204
vtkImageViewer2::SetColorLevel
virtual void SetColorLevel(double s)
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:36
vtkImageViewer2::SetColorWindow
virtual void SetColorWindow(double s)
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:50
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69