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 
24 class VTKREMOTINGVIEWS_EXPORT vtkPVComparativeView : public vtkObject
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
vtkCommand
vtkObjectBase::operator=
void operator=(const vtkObjectBase &)
vtkSMComparativeAnimationCueProxy
cue used for parameter animation by the comparative view.
Definition: vtkSMComparativeAnimationCueProxy.h:22
vtkObject::New
static vtkObject * New()
vtkPVComparativeView::Outdated
bool Outdated
Definition: vtkPVComparativeView.h:212
vtkPVComparativeView
view for comparative visualization/ film-strips.
Definition: vtkPVComparativeView.h:24
vtkObject::Modified
virtual void Modified()
vtkObject
time
time
vtkPVComparativeView::ViewTime
double ViewTime
Definition: vtkPVComparativeView.h:210
vtkSMProxy
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
vtkPVComparativeView::SetViewSize
void SetViewSize(int x, int y)
ViewSize, ViewPosition need to split up among all the component views correctly.
Definition: vtkPVComparativeView.h:112
vtkPVComparativeView::SetPPI
void SetPPI(int)
Satisfying vtkPVView API.
Definition: vtkPVComparativeView.h:148
vtkCollection
Update
virtual void Update()
vtkPVComparativeView::CleanupAfterScreenshot
void CleanupAfterScreenshot()
Definition: vtkPVComparativeView.h:194
vtkPVComparativeView::RootView
vtkSMViewProxy * RootView
Definition: vtkPVComparativeView.h:215
vtkPVComparativeView::Initialize
void Initialize(unsigned int)
Provides empty handlers to simulate the vtkPVView API.
Definition: vtkPVComparativeView.h:34
vtkImageData
vtkIndent
vtkPVComparativeView::SetViewPosition
void SetViewPosition(int x, int y)
ViewSize, ViewPosition need to split up among all the component views correctly.
Definition: vtkPVComparativeView.h:125
vtkPVComparativeView::PrepareForScreenshot
void PrepareForScreenshot()
These methods mimic the vtkPVView API.
Definition: vtkPVComparativeView.h:193
vtkObject.h
vtkSMViewProxy
Superclass for all view proxies.
Definition: vtkSMViewProxy.h:42
vtkPVComparativeView::SetViewTime
void SetViewTime(double time)
Get/Set the view time.
Definition: vtkPVComparativeView.h:171
vtkObject::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) VTK_OVERRIDE
vtkPVComparativeView::OverlayAllComparisons
bool OverlayAllComparisons
Definition: vtkPVComparativeView.h:211
vtkPVComparativeView::MarkOutdated
void MarkOutdated()
Marks the view dirty i.e.
Definition: vtkPVComparativeView.h:186