ParaView
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 
34 #include "vtkPVClientServerCoreRenderingModule.h" //needed for exports
36 #include "vtkSmartPointer.h" // needed for vtkSmartPointer.
37 
38 class vtkActor2D;
39 class vtkCellCenters;
40 class vtkCallbackCommand;
42 class vtkLabeledDataMapper;
43 class vtkProp3D;
44 class vtkPVCacheKeeper;
45 class vtkTextProperty;
46 class vtkTransform;
47 
48 class VTKPVCLIENTSERVERCORERENDERING_EXPORT vtkDataLabelRepresentation
50 {
51 public:
52  static vtkDataLabelRepresentation* New();
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
62  virtual void MarkModified();
63 
65 
69  virtual void SetVisibility(bool val);
70  virtual bool GetVisibility();
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 SetPointLabelBold(int);
82  void SetPointLabelItalic(int);
83  void SetPointLabelShadow(int);
84  void SetPointLabelJustification(int);
85  void SetPointLabelFontSize(int);
86  void SetPointLabelFormat(const char*);
87 
88  void SetCellLabelVisibility(int);
89  void SetCellFieldDataArrayName(const char*);
90  void SetCellLabelMode(int);
91  void SetCellLabelColor(double r, double g, double b);
92  void SetCellLabelOpacity(double);
93  void SetCellLabelFontFamily(int);
94  void SetCellLabelBold(int);
95  void SetCellLabelItalic(int);
96  void SetCellLabelShadow(int);
97  void SetCellLabelJustification(int);
98  void SetCellLabelFontSize(int);
99  void SetCellLabelFormat(const char*);
100 
102 
105  void SetOrientation(double, double, double);
106  void SetOrigin(double, double, double);
107  void SetPosition(double, double, double);
108  void SetScale(double, double, double);
109  void SetUserTransform(const double[16]);
111 
118  int ProcessViewRequest(
119  vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo);
120 
121 protected:
124 
130  virtual bool AddToView(vtkView* view);
131 
137  virtual bool RemoveFromView(vtkView* view);
138 
142  virtual int FillInputPortInformation(int port, vtkInformation* info);
143 
154  virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*);
155 
159  virtual bool IsCached(double cache_key);
160 
161  void UpdateTransform();
162 
165 
166  vtkLabeledDataMapper* PointLabelMapper;
167  vtkTextProperty* PointLabelProperty;
168  vtkActor2D* PointLabelActor;
169 
170  vtkCellCenters* CellCenters;
171  vtkLabeledDataMapper* CellLabelMapper;
172  vtkTextProperty* CellLabelProperty;
173  vtkActor2D* CellLabelActor;
174 
176  vtkTransform* Transform;
177 
178  vtkSmartPointer<vtkDataObject> Dataset;
179 
180  // Mutes label mapper warnings
181  vtkCallbackCommand* WarningObserver;
182  static void OnWarningEvent(vtkObject* source, unsigned long, void* clientdata, void*);
183 
186 
187 private:
188  vtkDataLabelRepresentation(const vtkDataLabelRepresentation&) VTK_DELETE_FUNCTION;
189  void operator=(const vtkDataLabelRepresentation&) VTK_DELETE_FUNCTION;
190 };
191 
192 #endif
vtkLabeledDataMapper * PointLabelMapper
void PrintSelf(ostream &os, vtkIndent indent)
vtkPVDataRepresentation adds some ParaView specific API to data representations.
virtual bool IsCached(double cache_key)
Subclasses should override this method when they support caching to indicate if the particular key is...
representation for showing cell and point labels.
virtual void SetVisibility(bool val)
Get/Set the visibility for this representation.
virtual bool AddToView(vtkView *view)
Making these methods public.
virtual int ProcessViewRequest(vtkInformationRequestKey *request_type, vtkInformation *inInfo, vtkInformation *outInfo)
vtkAlgorithm::ProcessRequest() equivalent for rendering passes.
vtkCompositeDataToUnstructuredGridFilter * MergeBlocks
appends all vtkUnstructuredGrid leaves of the input composite dataset to a single vtkUnstructuredGrid...
virtual void MarkModified()
This is one of the most important functions.
virtual bool RemoveFromView(vtkView *view)
Making these methods public.
vtkLabeledDataMapper * CellLabelMapper
manages data cache for flip book animations.
vtkSmartPointer< vtkDataObject > Dataset
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
Overridden to invoke vtkCommand::UpdateDataEvent.
virtual bool GetVisibility()