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 =========================================================================*/
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:
50 
52 
55  static vtkResliceImageViewer *New();
57  void PrintSelf(ostream& os, vtkIndent indent) override;
59 
63  void Render() override;
64 
66 
69  void SetInputData(vtkImageData *in) override;
70  void SetInputConnection(vtkAlgorithmOutput* input) override;
72 
74 
77  void SetColorWindow(double s) override;
78  void SetColorLevel(double s) override;
80 
82 
86  vtkGetObjectMacro(ResliceCursorWidget,vtkResliceCursorWidget);
88 
93  enum
94  {
95  RESLICE_AXIS_ALIGNED = 0,
96  RESLICE_OBLIQUE = 1
97  };
98 
99  vtkGetMacro(ResliceMode, int);
100  virtual void SetResliceMode(int resliceMode);
102  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED); };
103  virtual void SetResliceModeToOblique()
104  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE); };
105 
107 
110  vtkResliceCursor * GetResliceCursor();
111  void SetResliceCursor( vtkResliceCursor * rc );
113 
115 
118  virtual void SetLookupTable( vtkScalarsToColors * );
119  vtkScalarsToColors * GetLookupTable();
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 { SliceChangedEvent = 1001 };
174 
175 protected:
177  ~vtkResliceImageViewer() override;
178 
179  void InstallPipeline() override;
180  void UnInstallPipeline() override;
181  void UpdateOrientation() override;
182  void UpdateDisplayExtent() override;
183  virtual void UpdatePointPlacer();
184 
186 
190  vtkPlane * GetReslicePlane();
191  double GetInterSliceSpacingInResliceMode();
193 
199  vtkResliceImageViewerScrollCallback * ScrollCallback;
200 
201 private:
203  void operator=(const vtkResliceImageViewer&) = delete;
204 };
205 
206 #endif
vtkPlane
perform various plane computations
Definition: vtkPlane.h:37
vtkImageViewer2.h
vtkBoundedPlanePointPlacer
a placer that constrains a handle to a finite plane
Definition: vtkBoundedPlanePointPlacer.h:41
vtkResliceImageViewer::ResliceCursorWidget
vtkResliceCursorWidget * ResliceCursorWidget
Definition: vtkResliceImageViewer.h:194
vtkImageViewer2::Render
virtual void Render(void)
Render the resulting image.
vtkResliceCursorWidget
represent a reslice cursor
Definition: vtkResliceCursorWidget.h:50
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:199
vtkImageViewer2::SetInputConnection
virtual void SetInputConnection(vtkAlgorithmOutput *input)
vtkResliceCursor
Geometry for a reslice cursor.
Definition: vtkResliceCursor.h:46
vtkImageViewer2
Display a 2D image.
Definition: vtkImageViewer2.h:78
vtkResliceImageViewer::Measurements
vtkResliceImageViewerMeasurements * Measurements
Definition: vtkResliceImageViewer.h:197
vtkImageViewer2::UnInstallPipeline
virtual void UnInstallPipeline()
vtkResliceImageViewerMeasurements
Manage measurements on a resliced image.
Definition: vtkResliceImageViewerMeasurements.h:45
vtkResliceImageViewer::ResliceMode
int ResliceMode
Definition: vtkResliceImageViewer.h:196
vtkResliceImageViewer::RESLICE_OBLIQUE
Definition: vtkResliceImageViewer.h:96
vtkResliceImageViewer::SetResliceModeToAxisAligned
virtual void SetResliceModeToAxisAligned()
Definition: vtkResliceImageViewer.h:101
vtkImageViewer2::New
static vtkImageViewer2 * New()
vtkImageViewer2::InstallPipeline
virtual void InstallPipeline()
vtkImageViewer2::UpdateOrientation
virtual void UpdateOrientation()
vtkResliceImageViewer::SliceScrollOnMouseWheel
vtkTypeBool SliceScrollOnMouseWheel
Definition: vtkResliceImageViewer.h:198
vtkResliceImageViewer::SetResliceModeToOblique
virtual void SetResliceModeToOblique()
Definition: vtkResliceImageViewer.h:103
vtkImageData
topologically and geometrically regular array of data
Definition: vtkImageData.h:47
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
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:66
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:78
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:195
vtkImageViewer2::SetColorLevel
virtual void SetColorLevel(double s)
vtkAlgorithmOutput
Proxy object to connect input/output ports.
Definition: vtkAlgorithmOutput.h:42
vtkImageViewer2::SetColorWindow
virtual void SetColorWindow(double s)
vtkResliceImageViewer::RESLICE_AXIS_ALIGNED
Definition: vtkResliceImageViewer.h:95
vtkResliceImageViewer
Display an image along with a reslice cursor.
Definition: vtkResliceImageViewer.h:47
vtkTypeBool
int vtkTypeBool
Definition: vtkABI.h:69