vtkDataLabelRepresentation.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
19 #ifndef vtkDataLabelRepresentation_h
20 #define vtkDataLabelRepresentation_h
21 
23 #include "vtkRemotingViewsModule.h" //needed for exports
24 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
25 
26 class vtkActor2D;
27 class vtkCellCenters;
28 class vtkCallbackCommand;
29 class vtkMergeBlocks;
31 class vtkMaskPoints;
32 class vtkProp3D;
33 class vtkTextProperty;
34 class vtkTransform;
35 
36 class VTKREMOTINGVIEWS_EXPORT vtkDataLabelRepresentation : public vtkPVDataRepresentation
37 {
38 public:
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
48  void SetVisibility(bool val) override;
49  bool GetVisibility() override;
51 
53 
57  void SetMaximumNumberOfLabels(int numLabels);
58  int GetMaximumNumberOfLabels();
60 
61  //***************************************************************************
62  // Methods to change various parameters on internal objects
63  void SetPointLabelVisibility(int);
64  void SetPointFieldDataArrayName(const char*);
65  void SetPointLabelMode(int);
66  void SetPointLabelColor(double r, double g, double b);
67  void SetPointLabelOpacity(double);
68  void SetPointLabelFontFamily(int);
69  void SetPointLabelFontFile(char*);
70  void SetPointLabelBold(int);
71  void SetPointLabelItalic(int);
72  void SetPointLabelShadow(int);
73  void SetPointLabelJustification(int);
74  void SetPointLabelFontSize(int);
75  void SetPointLabelFormat(const char*);
76 
77  void SetCellLabelVisibility(int);
78  void SetCellFieldDataArrayName(const char*);
79  void SetCellLabelMode(int);
80  void SetCellLabelColor(double r, double g, double b);
81  void SetCellLabelOpacity(double);
82  void SetCellLabelFontFamily(int);
83  void SetCellLabelFontFile(char*);
84  void SetCellLabelBold(int);
85  void SetCellLabelItalic(int);
86  void SetCellLabelShadow(int);
87  void SetCellLabelJustification(int);
88  void SetCellLabelFontSize(int);
89  void SetCellLabelFormat(const char*);
90 
92 
95  void SetOrientation(double, double, double);
96  void SetOrigin(double, double, double);
97  void SetPosition(double, double, double);
98  void SetScale(double, double, double);
99  void SetUserTransform(const double[16]);
101 
109  vtkInformation* outInfo) override;
110 
111 protected:
113  ~vtkDataLabelRepresentation() override;
114 
120  bool AddToView(vtkView* view) override;
121 
127  bool RemoveFromView(vtkView* view) override;
128 
132  int FillInputPortInformation(int port, vtkInformation* info) override;
133 
145 
146  void UpdateTransform();
147 
149 
154 
160 
163 
165 
166  // Mutes label mapper warnings
168  static void OnWarningEvent(vtkObject* source, unsigned long, void* clientdata, void*);
169 
173 
174 private:
176  void operator=(const vtkDataLabelRepresentation&) = delete;
177 };
178 
179 #endif
vtkDataRepresentation::New
static vtkDataRepresentation * New()
vtkDataLabelRepresentation::WarningObserver
vtkCallbackCommand * WarningObserver
Definition: vtkDataLabelRepresentation.h:167
vtkPVDataRepresentation::GetVisibility
virtual bool GetVisibility()
vtkDataLabelRepresentation::CellMask
vtkSmartPointer< vtkMaskPoints > CellMask
Definition: vtkDataLabelRepresentation.h:156
vtkProp3D
vtkPVDataRepresentation.h
vtkDataLabelRepresentation::MergeBlocks
vtkMergeBlocks * MergeBlocks
Definition: vtkDataLabelRepresentation.h:148
vtkInformationVector
vtkPVDataRepresentation::AddToView
bool AddToView(vtkView *view) override
Making these methods public.
vtkDataLabelRepresentation::PointLabelActor
vtkActor2D * PointLabelActor
Definition: vtkDataLabelRepresentation.h:153
vtkDataLabelRepresentation::Transform
vtkTransform * Transform
Definition: vtkDataLabelRepresentation.h:162
vtkObject
vtkSmartPointer< vtkMaskPoints >
vtkDataLabelRepresentation::PointMask
vtkSmartPointer< vtkMaskPoints > PointMask
Definition: vtkDataLabelRepresentation.h:150
vtkPVDataRepresentation::SetVisibility
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
Definition: vtkPVDataRepresentation.h:89
vtkTransform
vtkDataLabelRepresentation::CellCenters
vtkCellCenters * CellCenters
Definition: vtkDataLabelRepresentation.h:155
vtkDataLabelRepresentation::CellLabelMapper
vtkLabeledDataMapper * CellLabelMapper
Definition: vtkDataLabelRepresentation.h:157
vtkPVDataRepresentation::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
vtkPVDataRepresentation::RemoveFromView
bool RemoveFromView(vtkView *view) override
Making these methods public.
vtkDataLabelRepresentation
representation for showing cell and point labels.
Definition: vtkDataLabelRepresentation.h:36
vtkPassInputTypeAlgorithm::FillInputPortInformation
virtual int FillInputPortInformation(int port, vtkInformation *info)
vtkView
vtkIndent
vtkDataLabelRepresentation::TransformHelperProp
vtkProp3D * TransformHelperProp
Definition: vtkDataLabelRepresentation.h:161
vtkPVDataRepresentation::ProcessViewRequest
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkDataLabelRepresentation::Dataset
vtkSmartPointer< vtkDataObject > Dataset
Definition: vtkDataLabelRepresentation.h:164
vtkSmartPointer.h
vtkInformationRequestKey
vtkDataLabelRepresentation::CellLabelVisibility
int CellLabelVisibility
Definition: vtkDataLabelRepresentation.h:171
vtkMaskPoints
vtkDataLabelRepresentation::MaximumNumberOfLabels
int MaximumNumberOfLabels
Definition: vtkDataLabelRepresentation.h:172
vtkTextProperty
vtkInformation
vtkActor2D
vtkLabeledDataMapper
vtkMergeBlocks
merges blocks in a composite dataset to a dataset.
Definition: vtkMergeBlocks.h:24
vtkDataLabelRepresentation::PointLabelVisibility
int PointLabelVisibility
Definition: vtkDataLabelRepresentation.h:170
vtkPVDataRepresentation::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
vtkDataLabelRepresentation::PointLabelMapper
vtkLabeledDataMapper * PointLabelMapper
Definition: vtkDataLabelRepresentation.h:151
vtkCallbackCommand
vtkPVDataRepresentation
Definition: vtkPVDataRepresentation.h:23
vtkDataLabelRepresentation::CellLabelActor
vtkActor2D * CellLabelActor
Definition: vtkDataLabelRepresentation.h:159
vtkCellCenters
vtkDataLabelRepresentation::CellLabelProperty
vtkTextProperty * CellLabelProperty
Definition: vtkDataLabelRepresentation.h:158
vtkDataLabelRepresentation::PointLabelProperty
vtkTextProperty * PointLabelProperty
Definition: vtkDataLabelRepresentation.h:152