SMILX  1.01
vtkInteractorStyleImage2.h
1 /*=========================================================================
2 
3  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
4  All rights reserved.
5  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
6 
7  This software is distributed WITHOUT ANY WARRANTY; without even
8  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
9  PURPOSE. See the above copyright notice for more information.
10 
11 =========================================================================*/
12 /*=========================================================================
13  The Software is copyright (c) Commonwealth Scientific and Industrial Research Organisation (CSIRO)
14  ABN 41 687 119 230.
15  All rights reserved.
16 
17  Licensed under the CSIRO BSD 3-Clause License
18  You may not use this file except in compliance with the License.
19  You may obtain a copy of the License in the file LICENSE.md or at
20 
21  https://stash.csiro.au/projects/SMILI/repos/smili/browse/license.txt
22 
23  Unless required by applicable law or agreed to in writing, software
24  distributed under the License is distributed on an "AS IS" BASIS,
25  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
26  See the License for the specific language governing permissions and
27  limitations under the License.
28 =========================================================================*/
29 #ifndef __vtkInteractorStyleImage2_h
30 #define __vtkInteractorStyleImage2_h
31 
32 #include <vtkObjectFactory.h> //For image display from VTK5+
33 #if(VTK_MAJOR_VERSION > 5)
34  #include <vtkInteractionStyleModule.h> // For export macro
35  #define VTK_EXT_STYLE_EXPORT VTKINTERACTIONSTYLE_EXPORT
36 #else
37  #define VTK_EXT_STYLE_EXPORT VTK_RENDERING_EXPORT
38 #endif
39 #include <vtkInteractorStyleImage.h> //For image display from VTK5+
40 #include <vtkImageViewer2.h> //For image display from VTK5+
41 
42 class VTK_EXT_STYLE_EXPORT vtkInteractorStyleImage2 : public vtkInteractorStyleImage
43 {
44 public:
45  static vtkInteractorStyleImage2 *New();
46  vtkTypeMacro(vtkInteractorStyleImage2, vtkInteractorStyleImage);
47  void PrintSelf(ostream& os, vtkIndent indent);
48 
49  virtual void OnMouseWheelForward();
50  virtual void OnMouseWheelBackward();
51 
52  //Overloaded the Slice style of the original image interactor
53  //~ void SetInteractionModeToImageSlicing();
54 
55  inline vtkImageViewer2* GetViewer()
56  { return viewer; }
57  inline void SetViewer(vtkImageViewer2 *view)
58  { viewer = view; }
59 
60 protected:
63 
64  vtkImageViewer2 * viewer;
65 
66 private:
67  vtkInteractorStyleImage2(const vtkInteractorStyleImage2&); // Not implemented.
68  void operator=(const vtkInteractorStyleImage2&); // Not implemented.
69 };
70 
71 #endif