vtkSMSelectionHelper.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkSMSelectionHelper.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 =========================================================================*/
23 #ifndef vtkSMSelectionHelper_h
24 #define vtkSMSelectionHelper_h
25 
26 #include "vtkRemotingViewsModule.h" //needed for exports
27 #include "vtkSMObject.h"
28 
29 class vtkCollection;
30 class vtkSelection;
31 class vtkSelectionNode;
32 class vtkSMProxy;
33 class vtkSMSession;
34 class vtkSMSourceProxy;
35 
37 {
38 public:
39  static vtkSMSelectionHelper* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
53  static vtkSMProxy* NewSelectionSourceFromSelection(
54  vtkSMSession* session, vtkSelection* selection, bool ignore_composite_keys = false);
55 
56  static void NewSelectionSourcesFromSelection(vtkSelection* selection, vtkSMProxy* view,
57  vtkCollection* selSources, vtkCollection* selRepresentations);
58 
64  static vtkSMProxy* ConvertSelection(
65  int outputType, vtkSMProxy* selectionSourceProxy, vtkSMSourceProxy* dataSource, int outputport);
66 
73  static bool MergeSelection(vtkSMSourceProxy* output, vtkSMSourceProxy* input,
74  vtkSMSourceProxy* dataSource, int outputport);
75 
82  static bool SubtractSelection(vtkSMSourceProxy* output, vtkSMSourceProxy* input,
83  vtkSMSourceProxy* dataSource, int outputport);
84 
92  static bool ToggleSelection(vtkSMSourceProxy* output, vtkSMSourceProxy* input,
93  vtkSMSourceProxy* dataSource, int outputport);
94 
95 protected:
97  ~vtkSMSelectionHelper() override{};
98 
99  static void ConvertSurfaceSelectionToVolumeSelectionInternal(
100  vtkIdType connectionID, vtkSelection* input, vtkSelection* output, int global_ids);
101 
102 private:
104  void operator=(const vtkSMSelectionHelper&) = delete;
105 
106  static vtkSMProxy* NewSelectionSourceFromSelectionInternal(
107  vtkSMSession*, vtkSelectionNode* selection, vtkSMProxy* selSource, bool ignore_composite_keys);
108 
109  static vtkSMProxy* ConvertInternal(
110  vtkSMSourceProxy* inSource, vtkSMSourceProxy* dataSource, int dataPort, int outputType);
111 };
112 
113 #endif
#define VTKREMOTINGVIEWS_EXPORT
vtkSMSession is the default ParaView session.
Definition: vtkSMSession.h:35
int vtkIdType
superclass for most server manager classes
Definition: vtkSMObject.h:29
proxy for a VTK source on a server
static vtkSMObject * New()
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:152
Utility class to help with selection tasks.
void PrintSelf(ostream &os, vtkIndent indent) override