~ubuntu-branches/ubuntu/wily/ginkgocadx/wily-proposed

« back to all changes in this revision

Viewing changes to src/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.h

  • Committer: Bazaar Package Importer
  • Author(s): Andreas Tille
  • Date: 2011-05-02 08:09:26 UTC
  • Revision ID: james.westby@ubuntu.com-20110502080926-bql5wep49c7hg91t
Tags: upstream-2.4.1.1
ImportĀ upstreamĀ versionĀ 2.4.1.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  
 
3
 *  $Id$
 
4
 *  Ginkgo CADx Project
 
5
 *
 
6
 *  Code adapted from vtkINRIA3D
 
7
=========================================================================
 
8
 
 
9
Program:   vtkINRIA3D
 
10
Module:    $Id: vtkInteractorStyleImage2D.h 169 2009-03-31 00:01:09Z carlos $
 
11
Language:  C++
 
12
Author:    $Author: filus $
 
13
Date:      $Date: 2008-01-14 09:21:23 +0100 (lun, 14 ene 2008) $
 
14
Version:   $Revision: 608 $
 
15
 
 
16
Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
 
17
See Copyright.txt for details.
 
18
 
 
19
This software is distributed WITHOUT ANY WARRANTY; without even
 
20
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
 
21
PURPOSE.  See the above copyright notices for more information.
 
22
 
 
23
=========================================================================*/
 
24
#pragma once
 
25
 
 
26
#include <vtkInteractorStyleImage.h>
 
27
#include "../vtkginkgoimageviewer.h"
 
28
 
 
29
// Motion flags (See VTKIS_PICK and so on in vtkInteractorStyleImage.h)
 
30
#define VTKIS_MEASURE      5050
 
31
#define VTKIS_ZSLICE_MOVE  5051
 
32
 
 
33
 
 
34
class GinkgoInteractorStyleImage2D : public vtkInteractorStyleImage
 
35
{
 
36
 public:
 
37
  static GinkgoInteractorStyleImage2D *New();
 
38
  vtkTypeRevisionMacro (GinkgoInteractorStyleImage2D, vtkInteractorStyleImage);
 
39
  
 
40
  virtual void OnMouseMove();
 
41
  virtual void OnLeftButtonDown();
 
42
  virtual void OnLeftButtonUp();
 
43
  virtual void OnMiddleButtonDown();
 
44
  virtual void OnMiddleButtonUp();
 
45
  virtual void OnRightButtonDown();
 
46
  virtual void OnRightButtonUp();
 
47
  virtual void OnMouseWheelForward();
 
48
  virtual void OnMouseWheelBackward();
 
49
  virtual void OnChar();
 
50
  
 
51
  void SetView (vtkGinkgoImageViewer* view)
 
52
  {
 
53
    this->View = view;
 
54
  }
 
55
  
 
56
  vtkGetObjectMacro (View, vtkGinkgoImageViewer);
 
57
  vtkSetMacro (ZSliceStep, int);
 
58
  vtkGetMacro (ZSliceStep, int);
 
59
 
 
60
  vtkSetMacro (WindowStep, double);
 
61
  vtkGetMacro (WindowStep, double);
 
62
 
 
63
  vtkSetMacro (LevelStep,  double);
 
64
  vtkGetMacro (LevelStep,  double);
 
65
 
 
66
 
 
67
  virtual void StartZSliceMove();
 
68
  virtual void ZSliceMove();
 
69
  virtual void ZSliceWheelForward();
 
70
  virtual void ZSliceWheelBackward();
 
71
  virtual void EndZSliceMove();
 
72
  virtual void FullPage();
 
73
  virtual void StartMeasure();
 
74
  virtual void Measure();
 
75
  virtual void EndMeasure();
 
76
  virtual void WindowLevel ();
 
77
  virtual void WindowLevelWheelForward ();
 
78
  virtual void WindowLevelWheelBackward ();
 
79
 
 
80
  void PropagateCameraFocalAndPosition();
 
81
  
 
82
 protected:
 
83
  GinkgoInteractorStyleImage2D();
 
84
  ~GinkgoInteractorStyleImage2D();
 
85
 
 
86
 private:
 
87
  
 
88
 private:
 
89
  vtkGinkgoImageViewer*  View;
 
90
  int                    ZSliceStep;
 
91
  double                 WindowStep;
 
92
  double                 LevelStep;
 
93
  
 
94
};
 
95