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 =========================================================================*/
30 #ifndef vtkResliceImageViewer_h
31 #define vtkResliceImageViewer_h
32 
33 #include "vtkImageViewer2.h"
34 #include "vtkInteractionImageModule.h" // For export macro
35 
37 class vtkResliceCursor;
38 class vtkScalarsToColors;
41 class vtkResliceImageViewerScrollCallback;
42 class vtkPlane;
43 
44 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
45 {
46 public:
48 
53  void PrintSelf(ostream& os, vtkIndent indent) override;
55 
59  void Render() override;
60 
62 
65  void SetInputData(vtkImageData* in) override;
66  void SetInputConnection(vtkAlgorithmOutput* input) override;
68 
70 
73  void SetColorWindow(double s) override;
74  void SetColorLevel(double s) override;
76 
78 
82  vtkGetObjectMacro(ResliceCursorWidget, vtkResliceCursorWidget);
84 
89  enum
90  {
91  RESLICE_AXIS_ALIGNED = 0,
92  RESLICE_OBLIQUE = 1
93  };
94 
95  vtkGetMacro(ResliceMode, int);
96  virtual void SetResliceMode(int resliceMode);
98  {
99  this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED);
100  }
101  virtual void SetResliceModeToOblique()
102  {
103  this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE);
104  }
105 
107 
113 
115 
121 
123 
126  virtual void SetThickMode(int);
127  virtual int GetThickMode();
129 
133  virtual void Reset();
134 
136 
139  vtkGetObjectMacro(PointPlacer, vtkBoundedPlanePointPlacer);
141 
143 
146  vtkGetObjectMacro(Measurements, vtkResliceImageViewerMeasurements);
148 
150 
153  vtkGetObjectMacro(Interactor, vtkRenderWindowInteractor);
155 
157 
163  vtkSetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
164  vtkGetMacro(SliceScrollOnMouseWheel, vtkTypeBool);
165  vtkBooleanMacro(SliceScrollOnMouseWheel, vtkTypeBool);
167 
171  virtual void IncrementSlice(int n);
172 
173  enum
174  {
175  SliceChangedEvent = 1001
176  };
177 
178 protected:
181 
182  void InstallPipeline() override;
183  void UnInstallPipeline() override;
184  void UpdateOrientation() override;
185  void UpdateDisplayExtent() override;
186  virtual void UpdatePointPlacer();
187 
189 
196 
202  vtkResliceImageViewerScrollCallback* ScrollCallback;
203 
204 private:
206  void operator=(const vtkResliceImageViewer&) = delete;
207 };
208 
209 #endif
vtkResliceImageViewer::SetResliceMode
virtual void SetResliceMode(int resliceMode)
vtkPlane
perform various plane computations
Definition: vtkPlane.h:32
vtkImageViewer2.h
vtkBoundedPlanePointPlacer
a placer that constrains a handle to a finite plane
Definition: vtkBoundedPlanePointPlacer.h:38
vtkResliceImageViewer::SetResliceCursor
void SetResliceCursor(vtkResliceCursor *rc)
vtkResliceImageViewer::UpdateOrientation
void UpdateOrientation() override
vtkResliceImageViewer::SetColorLevel
void SetColorLevel(double s) override
vtkResliceImageViewer::ResliceCursorWidget
vtkResliceCursorWidget * ResliceCursorWidget
Definition: vtkResliceImageViewer.h:197
vtkResliceCursorWidget
represent a reslice cursor
Definition: vtkResliceCursorWidget.h:45
vtkResliceImageViewer::vtkResliceImageViewer
vtkResliceImageViewer()
vtkResliceImageViewer::ScrollCallback
vtkResliceImageViewerScrollCallback * ScrollCallback
Definition: vtkResliceImageViewer.h:202
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:44
vtkResliceImageViewer::SetInputData
void SetInputData(vtkImageData *in) override
Set/Get the input image to the viewer.
vtkImageViewer2
Display a 2D image.
Definition: vtkImageViewer2.h:76
vtkResliceImageViewer::IncrementSlice
virtual void IncrementSlice(int n)
Increment/Decrement slice by 'n' slices.
vtkResliceImageViewer::UpdatePointPlacer
virtual void UpdatePointPlacer()
vtkResliceImageViewer::Measurements
vtkResliceImageViewerMeasurements * Measurements
Definition: vtkResliceImageViewer.h:200
vtkResliceImageViewer::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkResliceImageViewer::~vtkResliceImageViewer
~vtkResliceImageViewer() override
vtkResliceImageViewer::GetReslicePlane
vtkPlane * GetReslicePlane()
Convenience methods to get the reslice plane and the normalized spacing between slices in reslice mod...
vtkResliceImageViewerMeasurements
Manage measurements on a resliced image.
Definition: vtkResliceImageViewerMeasurements.h:46
vtkResliceImageViewer::ResliceMode
int ResliceMode
Definition: vtkResliceImageViewer.h:199
vtkResliceImageViewer::SetResliceModeToAxisAligned
virtual void SetResliceModeToAxisAligned()
Definition: vtkResliceImageViewer.h:97
vtkResliceImageViewer::SetLookupTable
virtual void SetLookupTable(vtkScalarsToColors *)
Set the lookup table.
vtkResliceImageViewer::GetLookupTable
vtkScalarsToColors * GetLookupTable()
vtkResliceImageViewer::SliceScrollOnMouseWheel
vtkTypeBool SliceScrollOnMouseWheel
Definition: vtkResliceImageViewer.h:201
vtkResliceImageViewer::RESLICE_OBLIQUE
@ RESLICE_OBLIQUE
Definition: vtkResliceImageViewer.h:92
vtkResliceImageViewer::SetResliceModeToOblique
virtual void SetResliceModeToOblique()
Definition: vtkResliceImageViewer.h:101
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:42
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkResliceImageViewer::SetInputConnection
void SetInputConnection(vtkAlgorithmOutput *input) override
vtkScalarsToColors
Superclass for mapping scalar values to colors.
Definition: vtkScalarsToColors.h:60
vtkResliceImageViewer::Render
void Render() override
Render the resulting image.
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:74
vtkResliceImageViewer::PointPlacer
vtkBoundedPlanePointPlacer * PointPlacer
Definition: vtkResliceImageViewer.h:198
vtkResliceImageViewer::SetColorWindow
void SetColorWindow(double s) override
Set window and level for mapping pixels to colors.
vtkResliceImageViewer::RESLICE_AXIS_ALIGNED
@ RESLICE_AXIS_ALIGNED
Definition: vtkResliceImageViewer.h:91
vtkResliceImageViewer::GetInterSliceSpacingInResliceMode
double GetInterSliceSpacingInResliceMode()
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:37
vtkResliceImageViewer::GetResliceCursor
vtkResliceCursor * GetResliceCursor()
Set/Get the reslice cursor.
vtkResliceImageViewer::New
static vtkResliceImageViewer * New()
Standard VTK methods.
vtkResliceImageViewer::SetThickMode
virtual void SetThickMode(int)
Switch to / from thick mode.
vtkResliceImageViewer::UpdateDisplayExtent
void UpdateDisplayExtent() override
Update the display extent manually so that the proper slice for the given orientation is displayed.
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:45
vtkResliceImageViewer::InstallPipeline
void InstallPipeline() override
vtkResliceImageViewer::Reset
virtual void Reset()
Reset all views back to initial state.
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69
vtkResliceImageViewer::GetThickMode
virtual int GetThickMode()
vtkResliceImageViewer::UnInstallPipeline
void UnInstallPipeline() override