ParaView
vtkPVComparativeView.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkPVComparativeView.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 =========================================================================*/
24 #ifndef vtkPVComparativeView_h
25 #define vtkPVComparativeView_h
26 
27 #include "vtkObject.h"
28 #include "vtkPVServerManagerRenderingModule.h" //needed for exports
29 
30 class vtkCollection;
31 class vtkImageData;
33 class vtkSMProxy;
34 class vtkSMViewProxy;
35 
36 class VTKPVSERVERMANAGERRENDERING_EXPORT vtkPVComparativeView : public vtkObject
37 {
38 public:
39  static vtkPVComparativeView* New();
40  vtkTypeMacro(vtkPVComparativeView, vtkObject);
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
46  void Initialize(unsigned int){};
47 
51  void StillRender();
52 
56  void InteractiveRender();
57 
62  void Initialize(vtkSMViewProxy* rootView);
63 
72  void Build(int dx, int dy);
73 
75 
79  void SetOverlayAllComparisons(bool);
80  vtkGetMacro(OverlayAllComparisons, bool);
82 
84 
87  vtkGetVector2Macro(Dimensions, int);
89 
93  void AddRepresentation(vtkSMProxy*);
94 
98  void RemoveRepresentation(vtkSMProxy*);
99 
105  void RemoveAllRepresentations();
106 
110  void Update();
111 
117  void GetViews(vtkCollection* collection);
118 
120 
127  void GetRepresentationsForView(vtkSMViewProxy*, vtkCollection*);
128  void GetRepresentations(int x, int y, vtkCollection*);
130 
132 
135  vtkGetObjectMacro(RootView, vtkSMViewProxy);
137 
139 
143  void SetViewSize(int x, int y)
144  {
145  this->ViewSize[0] = x;
146  this->ViewSize[1] = y;
147  this->UpdateViewLayout();
148  }
150 
152 
156  void SetViewPosition(int x, int y)
157  {
158  this->ViewPosition[0] = x;
159  this->ViewPosition[1] = y;
160  this->UpdateViewLayout();
161  }
163 
165 
168  vtkSetVector2Macro(Spacing, int);
169  vtkGetVector2Macro(Spacing, int);
171 
173 
176  void AddCue(vtkSMComparativeAnimationCueProxy*);
177  void RemoveCue(vtkSMComparativeAnimationCueProxy*);
179 
181 
184  vtkGetMacro(ViewTime, double);
185  void SetViewTime(double time)
186  {
187  if (this->ViewTime != time)
188  {
189  this->ViewTime = time;
190  this->Modified();
191  this->MarkOutdated();
192  }
193  }
195 
200  void MarkOutdated() { this->Outdated = true; }
201 
209  vtkImageData* CaptureWindow(int magnification);
210 
211 protected:
214 
220  void AddNewView();
221 
225  void RemoveView(vtkSMViewProxy* remove);
226 
230  void UpdateViewLayout();
231 
235  void UpdateAllRepresentations(int x, int y);
236 
241  void ClearDataCaches(int x, int y);
242 
243  int Dimensions[2];
244  int ViewSize[2];
245  int ViewPosition[2];
246  int Spacing[2];
247  double ViewTime;
249  bool Outdated;
250 
251  void SetRootView(vtkSMViewProxy*);
253 
254 private:
255  vtkPVComparativeView(const vtkPVComparativeView&) VTK_DELETE_FUNCTION;
256  void operator=(const vtkPVComparativeView&) VTK_DELETE_FUNCTION;
257 
258  class vtkInternal;
259  vtkInternal* Internal;
260  vtkCommand* MarkOutdatedObserver;
261 };
262 
263 #endif
void SetViewPosition(int x, int y)
ViewSize, ViewPosition need to split up among all the component views correctly.
void MarkOutdated()
Marks the view dirty i.e.
void SetViewSize(int x, int y)
ViewSize, ViewPosition need to split up among all the component views correctly.
Superclass for all view proxies.
cue used for parameter animation by the comparative view.
void Initialize(unsigned int)
Provides empty handlers to simulate the vtkPVView API.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
void PrepareForScreenshot()
These methods mimic the vtkPVView API.
void SetViewTime(double time)
Get/Set the view time.
view for comparative visualization/ film-strips.