vtkPVComparativeView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
12 #ifndef vtkPVComparativeView_h
13 #define vtkPVComparativeView_h
14 
15 #include "vtkObject.h"
16 #include "vtkRemotingViewsModule.h" //needed for exports
17 
18 class vtkCollection;
19 class vtkImageData;
21 class vtkSMProxy;
22 class vtkSMViewProxy;
23 
25 {
26 public:
27  static vtkPVComparativeView* New();
29  void PrintSelf(ostream& os, vtkIndent indent) override;
30 
34  void Initialize(unsigned int){};
35 
39  void StillRender();
40 
44  void InteractiveRender();
45 
50  void Initialize(vtkSMViewProxy* rootView);
51 
60  void Build(int dx, int dy);
61 
63 
67  void SetOverlayAllComparisons(bool);
68  vtkGetMacro(OverlayAllComparisons, bool);
70 
72 
75  vtkGetVector2Macro(Dimensions, int);
77 
81  void AddRepresentation(vtkSMProxy*);
82 
86  void RemoveRepresentation(vtkSMProxy*);
87 
91  void Update();
92 
98  void GetViews(vtkCollection* collection);
99 
101 
104  vtkGetObjectMacro(RootView, vtkSMViewProxy);
106 
108 
112  void SetViewSize(int x, int y)
113  {
114  this->ViewSize[0] = x;
115  this->ViewSize[1] = y;
116  this->UpdateViewLayout();
117  }
119 
121 
125  void SetViewPosition(int x, int y)
126  {
127  this->ViewPosition[0] = x;
128  this->ViewPosition[1] = y;
129  this->UpdateViewLayout();
130  }
132 
134 
140  void SetTileScale(int x, int y);
141  void SetTileViewport(double x0, double y0, double x1, double y1);
143 
148  void SetPPI(int) {}
149 
151 
154  vtkSetVector2Macro(Spacing, int);
155  vtkGetVector2Macro(Spacing, int);
157 
159 
162  void AddCue(vtkSMComparativeAnimationCueProxy*);
163  void RemoveCue(vtkSMComparativeAnimationCueProxy*);
165 
167 
170  vtkGetMacro(ViewTime, double);
171  void SetViewTime(double time)
172  {
173  if (this->ViewTime != time)
174  {
175  this->ViewTime = time;
176  this->Modified();
177  this->MarkOutdated();
178  }
179  }
181 
186  void MarkOutdated() { this->Outdated = true; }
187 
195  vtkImageData* CaptureWindow(int magX, int magY);
196 
197 protected:
199  ~vtkPVComparativeView() override;
200 
204  void UpdateViewLayout();
205 
206  int Dimensions[2];
207  int ViewSize[2];
208  int ViewPosition[2];
209  int Spacing[2];
210  double ViewTime;
212  bool Outdated;
213 
214  void SetRootView(vtkSMViewProxy*);
216 
217 private:
219  void operator=(const vtkPVComparativeView&) = delete;
220 
221  class vtkInternal;
222  vtkInternal* Internal;
223  vtkCommand* MarkOutdatedObserver;
224 };
225 
226 #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:140
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 &)