VTK
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 "vtkInteractionImageModule.h" // For export macro
34 #include "vtkImageViewer2.h"
35 
37 class vtkResliceCursor;
38 class vtkScalarsToColors;
41 class vtkResliceImageViewerScrollCallback;
42 class vtkPlane;
43 
44 class VTKINTERACTIONIMAGE_EXPORT vtkResliceImageViewer : public vtkImageViewer2
45 {
46 public:
47 
49 
52  static vtkResliceImageViewer *New();
54  void PrintSelf(ostream& os, vtkIndent indent) override;
56 
60  void Render() override;
61 
63 
66  void SetInputData(vtkImageData *in) override;
67  void SetInputConnection(vtkAlgorithmOutput* input) override;
69 
71 
74  void SetColorWindow(double s) override;
75  void SetColorLevel(double s) override;
77 
79 
83  vtkGetObjectMacro(ResliceCursorWidget,vtkResliceCursorWidget);
85 
90  enum
91  {
92  RESLICE_AXIS_ALIGNED = 0,
93  RESLICE_OBLIQUE = 1
94  };
95 
96  vtkGetMacro(ResliceMode, int);
97  virtual void SetResliceMode(int resliceMode);
99  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED); };
100  virtual void SetResliceModeToOblique()
101  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE); };
102 
104 
107  vtkResliceCursor * GetResliceCursor();
108  void SetResliceCursor( vtkResliceCursor * rc );
110 
112 
115  virtual void SetLookupTable( vtkScalarsToColors * );
116  vtkScalarsToColors * GetLookupTable();
118 
120 
123  virtual void SetThickMode( int );
124  virtual int GetThickMode();
126 
130  virtual void Reset();
131 
133 
136  vtkGetObjectMacro( PointPlacer, vtkBoundedPlanePointPlacer );
138 
140 
143  vtkGetObjectMacro( Measurements, vtkResliceImageViewerMeasurements );
145 
147 
150  vtkGetObjectMacro( Interactor, vtkRenderWindowInteractor );
152 
154 
160  vtkSetMacro( SliceScrollOnMouseWheel, vtkTypeBool );
161  vtkGetMacro( SliceScrollOnMouseWheel, vtkTypeBool );
162  vtkBooleanMacro( SliceScrollOnMouseWheel, vtkTypeBool );
164 
168  virtual void IncrementSlice( int n );
169 
170  enum { SliceChangedEvent = 1001 };
171 
172 protected:
174  ~vtkResliceImageViewer() override;
175 
176  void InstallPipeline() override;
177  void UnInstallPipeline() override;
178  void UpdateOrientation() override;
179  void UpdateDisplayExtent() override;
180  virtual void UpdatePointPlacer();
181 
183 
187  vtkPlane * GetReslicePlane();
188  double GetInterSliceSpacingInResliceMode();
190 
196  vtkResliceImageViewerScrollCallback * ScrollCallback;
197 
198 private:
200  void operator=(const vtkResliceImageViewer&) = delete;
201 };
202 
203 #endif
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:38
vtkResliceImageViewer::ResliceCursorWidget
vtkResliceCursorWidget * ResliceCursorWidget
Definition: vtkResliceImageViewer.h:191
vtkImageViewer2::Render
virtual void Render(void)
Render the resulting image.
vtkResliceCursorWidget
represent a reslice cursor
Definition: vtkResliceCursorWidget.h:44
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:196
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:194
vtkImageViewer2::UnInstallPipeline
virtual void UnInstallPipeline()
vtkResliceImageViewerMeasurements
Manage measurements on a resliced image.
Definition: vtkResliceImageViewerMeasurements.h:45
vtkResliceImageViewer::ResliceMode
int ResliceMode
Definition: vtkResliceImageViewer.h:193
vtkResliceImageViewer::RESLICE_OBLIQUE
Definition: vtkResliceImageViewer.h:93
vtkResliceImageViewer::SetResliceModeToAxisAligned
virtual void SetResliceModeToAxisAligned()
Definition: vtkResliceImageViewer.h:98
vtkImageViewer2::New
static vtkImageViewer2 * New()
vtkImageViewer2::InstallPipeline
virtual void InstallPipeline()
vtkImageViewer2::UpdateOrientation
virtual void UpdateOrientation()
vtkResliceImageViewer::SliceScrollOnMouseWheel
vtkTypeBool SliceScrollOnMouseWheel
Definition: vtkResliceImageViewer.h:195
vtkResliceImageViewer::SetResliceModeToOblique
virtual void SetResliceModeToOblique()
Definition: vtkResliceImageViewer.h:100
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:39
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:60
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:72
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:192
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::RESLICE_AXIS_ALIGNED
Definition: vtkResliceImageViewer.h:92
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:44
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69