VTK  9.7.20261007
vtkScivisDataRepresentation.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-License-Identifier: BSD-3-Clause
3
28
29#ifndef vtkScivisDataRepresentation_h
30#define vtkScivisDataRepresentation_h
31
32#include "vtkNew.h" // For ivars
34#include "vtkSmartPointer.h" // For ivars
35#include "vtkViewsScivisModule.h" // For export macro
36#include "vtkWrappingHints.h" // For VTK_MARSHALAUTO
37
38VTK_ABI_NAMESPACE_BEGIN
40class vtkPlane;
43class vtkScivisView;
44class vtkSelection;
45
48{
49public:
51 void PrintSelf(ostream& os, vtkIndent indent) override;
52
61 virtual bool GetBounds(double bounds[6]) = 0;
62
64
78 virtual const char* GetRenderedArrayName() = 0;
79 virtual int GetRenderedFieldAssociation() = 0;
81
95 virtual bool GetDataRange(
96 const char* arrayName, int fieldAssoc, double range[2], int component = -1) = 0;
97
99
124 virtual void SetColorMap(vtkScalarsToColors* map) = 0;
127
129
156
163 {
164 return this->GetInternalOutputPort(port, 0);
165 }
166 virtual vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn);
167
169
172 vtkSetMacro(Selectable, bool);
173 vtkGetMacro(Selectable, bool);
174 vtkBooleanMacro(Selectable, bool);
176
183 void Select(vtkScivisView* view, vtkSelection* selection)
184 {
185 this->Select(view, selection, false);
186 }
187 void Select(vtkScivisView* view, vtkSelection* selection, bool extend);
188
193
194protected:
197
204
208 virtual void UpdateSelection(vtkSelection* selection, bool extend);
209
213
214private:
215 friend class vtkScivisView;
216
218 void operator=(const vtkScivisDataRepresentation&) = delete;
219
220 class Internals;
221 Internals* Implementation;
222};
223
224VTK_ABI_NAMESPACE_END
225#endif
Proxy object to connect input/output ports.
a simple class to control print indentation
Definition vtkIndent.h:108
Allocate and hold a VTK object.
Definition vtkNew.h:168
maintain a list of planes
perform various plane computations
Definition vtkPlane.h:141
Superclass for mapping scalar values to colors.
vtkNew< vtkPlaneCollection > ClippingPlanes
virtual void SetColorMap(vtkScalarsToColors *map)=0
The color map this representation draws through.
virtual bool GetBounds(double bounds[6])=0
The extent of what this representation draws, in world coordinates, as (xmin, xmax,...
virtual void UpdateSelection(vtkSelection *selection, bool extend)
Make selection current and fire SelectionChangedEvent.
void SetClippingPlanes(vtkPlaneCollection *planes)
Planes that cut away part of what this representation draws.
vtkAlgorithmOutput * GetInternalOutputPort()
A shallow copy of an input, kept up to date, that the filters inside a representation can be connecte...
void RemoveAllClippingPlanes()
Planes that cut away part of what this representation draws.
virtual int GetRenderedFieldAssociation()=0
The array being mapped to colors, and one of the vtkDataObject::FIELD_ASSOCIATION_* values for the at...
virtual const char * GetRenderedArrayName()=0
The array being mapped to colors, and one of the vtkDataObject::FIELD_ASSOCIATION_* values for the at...
vtkPlaneCollection * GetClippingPlanes()
Planes that cut away part of what this representation draws.
vtkSmartPointer< vtkSelection > CurrentSelection
vtkSelection * GetCurrentSelection()
What this representation currently has selected, or null.
void RemoveClippingPlane(vtkPlane *plane)
Planes that cut away part of what this representation draws.
virtual bool GetDataRange(const char *arrayName, int fieldAssoc, double range[2], int component=-1)=0
The range of arrayName over the data this representation draws, so that several representations of on...
virtual vtkAlgorithmOutput * GetInternalOutputPort(int port, int conn)
~vtkScivisDataRepresentation() override
int GetNumberOfClippingPlanes()
Planes that cut away part of what this representation draws.
void Select(vtkScivisView *view, vtkSelection *selection, bool extend)
void Select(vtkScivisView *view, vtkSelection *selection)
Hand this representation a selection made in view.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void AddClippingPlane(vtkPlane *plane)
Planes that cut away part of what this representation draws.
virtual vtkSelection * ConvertSelection(vtkScivisView *view, vtkSelection *selection)
Turn a selection made in view into one expressed over this representation's own input.
vtkAlgorithmOutput * GetInternalOutputPort(int port)
virtual vtkScalarsToColors * GetColorMap()=0
The color map this representation draws through.
A ready-made rendering assembly for scientific visualization.
data object that represents a "selection" in VTK.
Hold a reference to a vtkObjectBase instance.
#define VTK_MARSHAL_EXCLUDE_REASON_IS_INTERNAL
#define VTK_MARSHALAUTO
#define VTK_MARSHALEXCLUDE(reason)