VTK
vtkApplyColors.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkApplyColors.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm 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 =========================================================================*/
15 /*-------------------------------------------------------------------------
16  Copyright 2008 Sandia Corporation.
17  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18  the U.S. Government retains certain rights in this software.
19 -------------------------------------------------------------------------*/
77 #ifndef vtkApplyColors_h
78 #define vtkApplyColors_h
79 
80 #include "vtkViewsInfovisModule.h" // For export macro
82 
83 class vtkScalarsToColors;
85 
86 class VTKVIEWSINFOVIS_EXPORT vtkApplyColors : public vtkPassInputTypeAlgorithm
87 {
88 public:
89  static vtkApplyColors *New();
91  void PrintSelf(ostream& os, vtkIndent indent) override;
92 
94 
98  virtual void SetPointLookupTable(vtkScalarsToColors* lut);
99  vtkGetObjectMacro(PointLookupTable, vtkScalarsToColors);
101 
103 
107  vtkSetMacro(UsePointLookupTable, bool);
108  vtkGetMacro(UsePointLookupTable, bool);
109  vtkBooleanMacro(UsePointLookupTable, bool);
111 
113 
117  vtkSetMacro(ScalePointLookupTable, bool);
118  vtkGetMacro(ScalePointLookupTable, bool);
119  vtkBooleanMacro(ScalePointLookupTable, bool);
121 
123 
127  vtkSetVector3Macro(DefaultPointColor, double);
128  vtkGetVector3Macro(DefaultPointColor, double);
130 
132 
136  vtkSetMacro(DefaultPointOpacity, double);
137  vtkGetMacro(DefaultPointOpacity, double);
139 
141 
145  vtkSetVector3Macro(SelectedPointColor, double);
146  vtkGetVector3Macro(SelectedPointColor, double);
148 
150 
154  vtkSetMacro(SelectedPointOpacity, double);
155  vtkGetMacro(SelectedPointOpacity, double);
157 
159 
163  vtkSetStringMacro(PointColorOutputArrayName);
164  vtkGetStringMacro(PointColorOutputArrayName);
166 
168 
172  virtual void SetCellLookupTable(vtkScalarsToColors* lut);
173  vtkGetObjectMacro(CellLookupTable, vtkScalarsToColors);
175 
177 
181  vtkSetMacro(UseCellLookupTable, bool);
182  vtkGetMacro(UseCellLookupTable, bool);
183  vtkBooleanMacro(UseCellLookupTable, bool);
185 
187 
191  vtkSetMacro(ScaleCellLookupTable, bool);
192  vtkGetMacro(ScaleCellLookupTable, bool);
193  vtkBooleanMacro(ScaleCellLookupTable, bool);
195 
197 
201  vtkSetVector3Macro(DefaultCellColor, double);
202  vtkGetVector3Macro(DefaultCellColor, double);
204 
206 
210  vtkSetMacro(DefaultCellOpacity, double);
211  vtkGetMacro(DefaultCellOpacity, double);
213 
215 
219  vtkSetVector3Macro(SelectedCellColor, double);
220  vtkGetVector3Macro(SelectedCellColor, double);
222 
224 
228  vtkSetMacro(SelectedCellOpacity, double);
229  vtkGetMacro(SelectedCellOpacity, double);
231 
233 
237  vtkSetStringMacro(CellColorOutputArrayName);
238  vtkGetStringMacro(CellColorOutputArrayName);
240 
242 
247  vtkSetMacro(UseCurrentAnnotationColor, bool);
248  vtkGetMacro(UseCurrentAnnotationColor, bool);
249  vtkBooleanMacro(UseCurrentAnnotationColor, bool);
251 
255  vtkMTimeType GetMTime() override;
256 
257 protected:
258  vtkApplyColors();
259  ~vtkApplyColors() override;
260 
264  int RequestData(
266 
270  int FillInputPortInformation(int port, vtkInformation* info) override;
271 
272  void ProcessColorArray(
273  vtkUnsignedCharArray* colorArr,
274  vtkScalarsToColors* lut,
275  vtkAbstractArray* arr,
276  unsigned char color[4],
277  bool scale);
278 
281  double DefaultPointColor[3];
283  double DefaultCellColor[3];
285  double SelectedPointColor[3];
287  double SelectedCellColor[3];
296 
297 private:
298  vtkApplyColors(const vtkApplyColors&) = delete;
299  void operator=(const vtkApplyColors&) = delete;
300 };
301 
302 #endif
bool UseCurrentAnnotationColor
Superclass for algorithms that produce output of the same type as input.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:302
Abstract superclass for all arrays.
double SelectedCellOpacity
char * PointColorOutputArrayName
double DefaultCellOpacity
double DefaultPointOpacity
Superclass for mapping scalar values to colors.
vtkScalarsToColors * CellLookupTable
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual vtkMTimeType GetMTime()
Return this object's modified time.
int FillInputPortInformation(int port, vtkInformation *info) override
Fill the input port information objects for this algorithm.
dynamic, self-adjusting array of unsigned char
char * CellColorOutputArrayName
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
double SelectedPointOpacity
Store zero or more vtkInformation instances.
apply colors to a data set.
virtual int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
static vtkPassInputTypeAlgorithm * New()
vtkScalarsToColors * PointLookupTable
bool ScalePointLookupTable