VTK  9.7.20260824
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
37VTK_ABI_NAMESPACE_BEGIN
39class vtkPlane;
42class vtkScivisView;
43class vtkSelection;
44
45class VTKVIEWSSCIVIS_EXPORT vtkScivisDataRepresentation : public vtkScivisRepresentation
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
59 virtual bool GetBounds(double bounds[6]) = 0;
60
62
76 virtual const char* GetRenderedArrayName() = 0;
77 virtual int GetRenderedFieldAssociation() = 0;
79
93 virtual bool GetDataRange(
94 const char* arrayName, int fieldAssoc, double range[2], int component = -1) = 0;
95
97
109 virtual void SetColorMap(vtkScalarsToColors* map) = 0;
112
114
138
145 {
146 return this->GetInternalOutputPort(port, 0);
147 }
148 virtual vtkAlgorithmOutput* GetInternalOutputPort(int port, int conn);
149
151
154 vtkSetMacro(Selectable, bool);
155 vtkGetMacro(Selectable, bool);
156 vtkBooleanMacro(Selectable, bool);
158
165 void Select(vtkScivisView* view, vtkSelection* selection)
166 {
167 this->Select(view, selection, false);
168 }
169 void Select(vtkScivisView* view, vtkSelection* selection, bool extend);
170
175
176protected:
179
186
190 virtual void UpdateSelection(vtkSelection* selection, bool extend);
191
195
196private:
197 friend class vtkScivisView;
198
200 void operator=(const vtkScivisDataRepresentation&) = delete;
201
202 class Internals;
203 Internals* Implementation;
204};
205
206VTK_ABI_NAMESPACE_END
207#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.