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 "vtkRemotingViewsModule.h" //needed for exports
29 
30 class vtkCollection;
31 class vtkImageData;
33 class vtkSMProxy;
34 class vtkSMViewProxy;
35 
37 {
38 public:
39  static vtkPVComparativeView* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
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 
103  void Update();
104 
110  void GetViews(vtkCollection* collection);
111 
113 
116  vtkGetObjectMacro(RootView, vtkSMViewProxy);
118 
120 
124  void SetViewSize(int x, int y)
125  {
126  this->ViewSize[0] = x;
127  this->ViewSize[1] = y;
128  this->UpdateViewLayout();
129  }
131 
133 
137  void SetViewPosition(int x, int y)
138  {
139  this->ViewPosition[0] = x;
140  this->ViewPosition[1] = y;
141  this->UpdateViewLayout();
142  }
144 
146 
152  void SetTileScale(int x, int y);
153  void SetTileViewport(double x0, double y0, double x1, double y1);
155 
160  void SetPPI(int) {}
161 
163 
166  vtkSetVector2Macro(Spacing, int);
167  vtkGetVector2Macro(Spacing, int);
169 
171 
174  void AddCue(vtkSMComparativeAnimationCueProxy*);
175  void RemoveCue(vtkSMComparativeAnimationCueProxy*);
177 
179 
182  vtkGetMacro(ViewTime, double);
183  void SetViewTime(double time)
184  {
185  if (this->ViewTime != time)
186  {
187  this->ViewTime = time;
188  this->Modified();
189  this->MarkOutdated();
190  }
191  }
193 
198  void MarkOutdated() { this->Outdated = true; }
199 
207  vtkImageData* CaptureWindow(int magX, int magY);
208 
209 protected:
211  ~vtkPVComparativeView() override;
212 
216  void UpdateViewLayout();
217 
218  int Dimensions[2];
219  int ViewSize[2];
220  int ViewPosition[2];
221  int Spacing[2];
222  double ViewTime;
224  bool Outdated;
225 
226  void SetRootView(vtkSMViewProxy*);
228 
229 private:
231  void operator=(const vtkPVComparativeView&) = delete;
232 
233  class vtkInternal;
234  vtkInternal* Internal;
235  vtkCommand* MarkOutdatedObserver;
236 };
237 
238 #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.
#define VTKREMOTINGVIEWS_EXPORT
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
Superclass for all view proxies.
virtual void Update()
cue used for parameter animation by the comparative view.
void Initialize(unsigned int)
Provides empty handlers to simulate the vtkPVView API.
void SetPPI(int)
Satisfying vtkPVView API.
virtual void Modified()
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.
static vtkObject * New()
void operator=(const vtkObjectBase &)