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 
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
vtkLabeledDataMapper * PointLabelMapper
#define VTKREMOTINGVIEWS_EXPORT
vtkPVDataRepresentation adds some ParaView specific API to data representations.
merges blocks in a composite dataset to a dataset.
bool AddToView(vtkView *view) override
Making these methods public.
vtkSmartPointer< vtkMaskPoints > CellMask
representation for showing cell and point labels.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
virtual int FillInputPortInformation(int port, vtkInformation *info)
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
Overridden to invoke vtkCommand::UpdateDataEvent.
bool RemoveFromView(vtkView *view) override
Making these methods public.
static vtkDataRepresentation * New()
vtkLabeledDataMapper * CellLabelMapper
vtkSmartPointer< vtkMaskPoints > PointMask
void PrintSelf(ostream &os, vtkIndent indent) override
vtkSmartPointer< vtkDataObject > Dataset
virtual bool GetVisibility()