vtkDataLabelRepresentation.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: vtkDataLabelRepresentation.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 =========================================================================*/
31 #ifndef vtkDataLabelRepresentation_h
32 #define vtkDataLabelRepresentation_h
33 
35 #include "vtkRemotingViewsModule.h" //needed for exports
36 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
37 
38 class vtkActor2D;
39 class vtkCellCenters;
40 class vtkCallbackCommand;
41 class vtkMergeBlocks;
43 class vtkMaskPoints;
44 class vtkProp3D;
45 class vtkTextProperty;
46 class vtkTransform;
47 
49 {
50 public:
53  void PrintSelf(ostream& os, vtkIndent indent) override;
54 
56 
60  void SetVisibility(bool val) override;
61  bool GetVisibility() override;
63 
65 
69  void SetMaximumNumberOfLabels(int numLabels);
70  int GetMaximumNumberOfLabels();
72 
73  //***************************************************************************
74  // Methods to change various parameters on internal objects
75  void SetPointLabelVisibility(int);
76  void SetPointFieldDataArrayName(const char*);
77  void SetPointLabelMode(int);
78  void SetPointLabelColor(double r, double g, double b);
79  void SetPointLabelOpacity(double);
80  void SetPointLabelFontFamily(int);
81  void SetPointLabelFontFile(char*);
82  void SetPointLabelBold(int);
83  void SetPointLabelItalic(int);
84  void SetPointLabelShadow(int);
85  void SetPointLabelJustification(int);
86  void SetPointLabelFontSize(int);
87  void SetPointLabelFormat(const char*);
88 
89  void SetCellLabelVisibility(int);
90  void SetCellFieldDataArrayName(const char*);
91  void SetCellLabelMode(int);
92  void SetCellLabelColor(double r, double g, double b);
93  void SetCellLabelOpacity(double);
94  void SetCellLabelFontFamily(int);
95  void SetCellLabelFontFile(char*);
96  void SetCellLabelBold(int);
97  void SetCellLabelItalic(int);
98  void SetCellLabelShadow(int);
99  void SetCellLabelJustification(int);
100  void SetCellLabelFontSize(int);
101  void SetCellLabelFormat(const char*);
102 
104 
107  void SetOrientation(double, double, double);
108  void SetOrigin(double, double, double);
109  void SetPosition(double, double, double);
110  void SetScale(double, double, double);
111  void SetUserTransform(const double[16]);
113 
121  vtkInformation* outInfo) override;
122 
123 protected:
125  ~vtkDataLabelRepresentation() override;
126 
132  bool AddToView(vtkView* view) override;
133 
139  bool RemoveFromView(vtkView* view) override;
140 
144  int FillInputPortInformation(int port, vtkInformation* info) override;
145 
157 
158  void UpdateTransform();
159 
161 
166 
172 
175 
177 
178  // Mutes label mapper warnings
180  static void OnWarningEvent(vtkObject* source, unsigned long, void* clientdata, void*);
181 
185 
186 private:
188  void operator=(const vtkDataLabelRepresentation&) = delete;
189 };
190 
191 #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()