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 SetBackgroundTexture(vtkTexture* val) override;
101 
105  void ScaleRendererViewports(const double viewport[4]) override;
106 
107 protected:
109  ~vtkPVOrthographicSliceView() override;
110 
111  void AboutToRenderOnLocalProcess(bool interactive) override;
112  void UpdateCenterAxes() override;
113 
114  //*****************************************************************
115  // Forward to vtkPVOrthographicSliceView instances.
116  void SetCenterOfRotation(double x, double y, double z) override;
117  void SetRotationFactor(double factor) override;
118 
123 
127  void UpdateBackground(vtkRenderer* renderer = nullptr) override;
128 
129  enum
130  {
131  SIDE_VIEW = 0,
132  TOP_VIEW = 1,
133  FRONT_VIEW = 2,
134 
135  YZ_PLANE = SIDE_VIEW,
136  ZX_PLANE = TOP_VIEW,
137  XY_PLANE = FRONT_VIEW,
138 
139  AXIAL_VIEW = TOP_VIEW,
140  CORONAL_VIEW = FRONT_VIEW,
141  SAGITTAL_VIEW = SIDE_VIEW,
142 
143  RIGHT_SIDE_VIEW = SIDE_VIEW
144  };
145 
146  vtkNew<vtkRenderer> Renderers[3];
148  vtkNew<vtkPVCenterAxesActor> SlicePositionAxes2D[3];
150  vtkNew<vtkTextRepresentation> SliceAnnotations[3];
152 
153  double SliceIncrements[3];
154  double SlicePosition[3];
156 
157 private:
159  void operator=(const vtkPVOrthographicSliceView&) = delete;
160 
161  void OnMouseWheelForwardEvent();
162  void OnMouseWheelBackwardEvent();
163  void MoveSlicePosition(vtkRenderer* ren, double position[3]);
164 
165  unsigned long MouseWheelForwardEventId;
166  unsigned long MouseWheelBackwardEventId;
167 
168  friend class vtkPVOrthographicSliceViewInteractorStyle;
169 
170  bool GridAxes3DActorsNeedShallowCopy;
171  unsigned long GridAxes3DActorObserverId;
172  void OnGridAxes3DActorModified();
173 };
174 
175 #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 UpdateBackground(vtkRenderer *renderer=nullptr)
Updates background color.
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.
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.