VTK
vtkMapArrayValues.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkMapArrayValues.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 =========================================================================*/
39 #ifndef vtkMapArrayValues_h
40 #define vtkMapArrayValues_h
41 
42 #include "vtkRenderingCoreModule.h" // For export macro
44 
45 class vtkMapType;
46 class vtkVariant;
47 
48 class VTKRENDERINGCORE_EXPORT vtkMapArrayValues : public vtkPassInputTypeAlgorithm
49 {
50 public:
52  void PrintSelf(ostream& os, vtkIndent indent);
53 
55 
57 
63  vtkGetMacro(FieldType, int);
65 
67 
72  vtkSetMacro(PassArray, int);
73  vtkGetMacro(PassArray, int);
74  vtkBooleanMacro(PassArray, int);
76 
78 
83  vtkSetMacro(FillValue, double);
84  vtkGetMacro(FillValue, double);
86 
88 
91  vtkSetStringMacro(InputArrayName);
92  vtkGetStringMacro(InputArrayName);
94 
96 
99  vtkSetStringMacro(OutputArrayName);
100  vtkGetStringMacro(OutputArrayName);
102 
104 
108  vtkGetMacro(OutputArrayType, int);
109  vtkSetMacro(OutputArrayType, int);
111 
113 
118  void AddToMap(int from, int to);
119  void AddToMap(int from, char *to);
120  void AddToMap(char *from, int to);
121  void AddToMap(char *from, char *to);
123 
127  void ClearMap();
128 
132  int GetMapSize();
133 
134  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
136  {
137  POINT_DATA=0,
138  CELL_DATA=1,
139  VERTEX_DATA=2,
140  EDGE_DATA=3,
141  ROW_DATA=4,
142  NUM_ATTRIBUTE_LOCS
143  };
144 
145 protected:
146 
149 
152 
157  int MapType;
159  double FillValue;
160 
161  // PIMPL idiom to hide map implementation.
162  vtkMapType *Map;
163 
164 private:
165  vtkMapArrayValues(const vtkMapArrayValues&) VTK_DELETE_FUNCTION;
166  void operator=(const vtkMapArrayValues&) VTK_DELETE_FUNCTION;
167 };
168 
169 #endif
vtkMapArrayValues::AddToMap
void AddToMap(int from, int to)
vtkMapArrayValues::FillInputPortInformation
int FillInputPortInformation(int, vtkInformation *)
Fill the input port information objects for this algorithm.
vtkPassInputTypeAlgorithm.h
vtkMapArrayValues::PassArray
int PassArray
Definition: vtkMapArrayValues.h:158
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:42
vtkMapArrayValues::AddToMap
void AddToMap(int from, char *to)
vtkMapArrayValues::vtkMapArrayValues
vtkMapArrayValues()
vtkMapArrayValues::FieldType
FieldType
Definition: vtkMapArrayValues.h:136
vtkMapArrayValues::AddToMap
void AddToMap(char *from, int to)
vtkMapArrayValues
Map values in an input array to different values in an output array of (possibly) different type.
Definition: vtkMapArrayValues.h:49
vtkMapArrayValues::OutputArrayName
char * OutputArrayName
Definition: vtkMapArrayValues.h:154
vtkMapArrayValues::AddToMap
void AddToMap(vtkVariant from, vtkVariant to)
Add to the internal STL map.
vtkMapArrayValues::AddToMap
void AddToMap(char *from, char *to)
vtkMapArrayValues::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
vtkMapArrayValues::New
static vtkMapArrayValues * New()
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkMapArrayValues::OutputArrayType
int OutputArrayType
Definition: vtkMapArrayValues.h:155
vtkVariant
A atomic type representing the union of many types.
Definition: vtkVariant.h:76
vtkMapArrayValues::FieldType
int FieldType
Definition: vtkMapArrayValues.h:156
vtkMapArrayValues::InputArrayName
char * InputArrayName
Definition: vtkMapArrayValues.h:153
vtkMapArrayValues::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *)
This is called within ProcessRequest when a request asks the algorithm to do its work.
vtkGetStringMacro
vtkGetStringMacro(ExtensionsString)
Returns a string listing all available extensions.
vtkMapArrayValues::Map
vtkMapType * Map
Definition: vtkMapArrayValues.h:162
vtkMapArrayValues::GetMapSize
int GetMapSize()
Get the size of the internal map.
vtkBooleanMacro
vtkBooleanMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:87
vtkSetMacro
vtkSetMacro(IgnoreDriverBugs, bool)
Updates the extensions string.
vtkMapArrayValues::FillValue
double FillValue
Definition: vtkMapArrayValues.h:159
vtkMapArrayValues::~vtkMapArrayValues
virtual ~vtkMapArrayValues()
vtkMapArrayValues::ClearMap
void ClearMap()
Clear the internal map.
vtkPassInputTypeAlgorithm
Superclass for algorithms that produce output of the same type as input.
Definition: vtkPassInputTypeAlgorithm.h:51
vtkMapArrayValues::MapType
int MapType
Definition: vtkMapArrayValues.h:157