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 =========================================================================*/
35 #ifndef __vtkResliceImageViewer_h
36 #define __vtkResliceImageViewer_h
37 
38 #include "vtkImageViewer2.h"
39 
41 class vtkResliceCursor;
42 class vtkScalarsToColors;
45 class vtkResliceImageViewerScrollCallback;
46 class vtkPlane;
47 
49 {
50 public:
51 
53 
54  static vtkResliceImageViewer *New();
56  void PrintSelf(ostream& os, vtkIndent indent);
58 
60  virtual void Render();
61 
63 
64  virtual void SetInput(vtkImageData *in);
65  virtual void SetInputConnection(vtkAlgorithmOutput* input);
67 
69 
70  virtual void SetColorWindow(double s);
71  virtual void SetColorLevel(double s);
73 
75 
77  vtkGetObjectMacro(ResliceCursorWidget,vtkResliceCursorWidget);
79 
81 
82  enum
83  {
84  RESLICE_AXIS_ALIGNED = 0,
85  RESLICE_OBLIQUE = 1
86  };
87  //ETX
89 
90  vtkGetMacro(ResliceMode, int);
91  virtual void SetResliceMode(int resliceMode);
92  virtual void SetResliceModeToAxisAligned()
93  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_AXIS_ALIGNED); };
94  virtual void SetResliceModeToOblique()
95  { this->SetResliceMode(vtkResliceImageViewer::RESLICE_OBLIQUE); };
96 
98 
99  vtkResliceCursor * GetResliceCursor();
100  void SetResliceCursor( vtkResliceCursor * rc );
102 
104 
105  virtual void SetLookupTable( vtkScalarsToColors * );
106  vtkScalarsToColors * GetLookupTable();
108 
110 
111  virtual void SetThickMode( int );
112  virtual int GetThickMode();
114 
116  virtual void Reset();
117 
119 
120  vtkGetObjectMacro( PointPlacer, vtkBoundedPlanePointPlacer );
122 
124 
125  vtkGetObjectMacro( Measurements, vtkResliceImageViewerMeasurements );
127 
129 
130  vtkGetObjectMacro( Interactor, vtkRenderWindowInteractor );
132 
134 
138  vtkSetMacro( SliceScrollOnMouseWheel, int );
139  vtkGetMacro( SliceScrollOnMouseWheel, int );
140  vtkBooleanMacro( SliceScrollOnMouseWheel, int );
142 
144  virtual void IncrementSlice( int n );
145 
146  enum { SliceChangedEvent = 1001 };
147 
148 protected:
151 
152  virtual void InstallPipeline();
153  virtual void UnInstallPipeline();
154  virtual void UpdateOrientation();
155  virtual void UpdateDisplayExtent();
156  virtual void UpdatePointPlacer();
157 
159 
161  vtkPlane * GetReslicePlane();
162  double GetInterSliceSpacingInResliceMode();
164 
170  vtkResliceImageViewerScrollCallback * ScrollCallback;
171 
172 private:
173  vtkResliceImageViewer(const vtkResliceImageViewer&); // Not implemented.
174  void operator=(const vtkResliceImageViewer&); // Not implemented.
175 };
176 
177 #endif