vtkPVOrthographicSliceView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVOrthographicSliceView.h
5 
6  Copyright (c) Kitware, Inc.
7  All rights reserved.
8  See Copyright.txt or http://www.paraview.org/HTML/Copyright.html 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 =========================================================================*/
34 #ifndef vtkPVOrthographicSliceView_h
35 #define vtkPVOrthographicSliceView_h
36 
37 #include "vtkPVMultiSliceView.h"
38 
39 class vtkPVOrthographicSliceViewInteractorStyle;
40 
42 {
43 public:
46  void PrintSelf(ostream& os, vtkIndent indent) override;
47 
52  void Update() override;
53 
54  enum
55  {
56  SAGITTAL_VIEW_RENDERER = vtkPVRenderView::NON_COMPOSITED_RENDERER + 1,
59  };
60 
64  vtkRenderer* GetRenderer(int rendererType = vtkPVRenderView::DEFAULT_RENDERER) override;
65 
66  virtual void ResetCamera();
67  virtual void ResetCamera(double bounds[6]);
68  void SetInteractionMode(int mode) override;
70 
72 
75  void SetSlicePosition(double x, double y, double z);
76  vtkGetVector3Macro(SlicePosition, double);
78 
80 
83  vtkSetVector3Macro(SliceIncrements, double);
85 
87 
90  vtkSetMacro(SliceAnnotationsVisibility, bool);
91  vtkGetMacro(SliceAnnotationsVisibility, bool);
93 
97  void SetCenterAxesVisibility(bool) override {}
98 
99  //*****************************************************************
100  void SetBackground(double r, double g, double b) override;
101  void SetBackground2(double r, double g, double b) override;
102  void SetBackgroundTexture(vtkTexture* val) override;
103  void SetGradientBackground(int val) override;
104  void SetTexturedBackground(int val) override;
105 
109  void ScaleRendererViewports(const double viewport[4]) override;
110 
111 protected:
113  ~vtkPVOrthographicSliceView() override;
114 
115  void AboutToRenderOnLocalProcess(bool interactive) override;
116  void UpdateCenterAxes() override;
117 
118  //*****************************************************************
119  // Forward to vtkPVOrthographicSliceView instances.
120  void SetCenterOfRotation(double x, double y, double z) override;
121  void SetRotationFactor(double factor) override;
122 
127 
128  enum
129  {
130  SIDE_VIEW = 0,
131  TOP_VIEW = 1,
132  FRONT_VIEW = 2,
133 
134  YZ_PLANE = SIDE_VIEW,
135  ZX_PLANE = TOP_VIEW,
136  XY_PLANE = FRONT_VIEW,
137 
138  AXIAL_VIEW = TOP_VIEW,
139  CORONAL_VIEW = FRONT_VIEW,
140  SAGITTAL_VIEW = SIDE_VIEW,
141 
142  RIGHT_SIDE_VIEW = SIDE_VIEW
143  };
144 
145  vtkNew<vtkRenderer> Renderers[3];
147  vtkNew<vtkPVCenterAxesActor> SlicePositionAxes2D[3];
149  vtkNew<vtkTextRepresentation> SliceAnnotations[3];
151 
152  double SliceIncrements[3];
153  double SlicePosition[3];
155 
156 private:
158  void operator=(const vtkPVOrthographicSliceView&) = delete;
159 
160  void OnMouseWheelForwardEvent();
161  void OnMouseWheelBackwardEvent();
162  void MoveSlicePosition(vtkRenderer* ren, double position[3]);
163 
164  unsigned long MouseWheelForwardEventId;
165  unsigned long MouseWheelBackwardEventId;
166 
167  friend class vtkPVOrthographicSliceViewInteractorStyle;
168 
169  bool GridAxes3DActorsNeedShallowCopy;
170  unsigned long GridAxes3DActorObserverId;
171  void OnGridAxes3DActorModified();
172 };
173 
174 #endif
static vtkPVMultiSliceView * New()
view with 3 orthographic slice views and 1 3D view.
virtual void SetBackgroundTexture(vtkTexture *val)
virtual void SetRotationFactor(double factor)
#define VTKREMOTINGVIEWS_EXPORT
virtual void SetCenterOfRotation(double x, double y, double z)
void ResetCamera()
Resets the active camera using collective prop-bounds.
virtual void UpdateCenterAxes()
UpdateCenterAxes().
vtkNew< vtkPVOrthographicSliceViewInteractorStyle > OrthographicInteractorStyle
void AboutToRenderOnLocalProcess(bool interactive) override
Called just before the local process renders.
vtkPVMultiSliceView extends vtkPVRenderView but add meta-data information used by SliceRepresentation...
virtual void SetBackground(double r, double g, double b)
virtual void SetGradientBackground(int val)
virtual void SetInteractionMode(int mode)
Get/Set the interaction mode.
virtual vtkRenderer * GetRenderer(int rendererType=DEFAULT_RENDERER)
Returns the renderer given an int identifying its type.
void Update() override
vtkNew< vtkPVCenterAxesActor > SlicePositionAxes3D
void ScaleRendererViewports(const double viewport[4]) override
Overridden to scale the OrientationWidget appropriately.
virtual void SetTexturedBackground(int val)
void PrintSelf(ostream &os, vtkIndent indent) override
virtual void SetGridAxes3DActor(vtkPVGridAxes3DActor *)
Set the vtkPVGridAxes3DActor to use for the view.
void SetCenterAxesVisibility(bool) override
To avoid confusion, we don&#39;t show the center axes at all in this view.
virtual void SetupInteractor(vtkRenderWindowInteractor *)
Set the interactor.
ParaView extensions for vtkGridAxes3DActor.
virtual void SetBackground2(double r, double g, double b)