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 =========================================================================*/
38 #ifndef __vtkMapArrayValues_h
39 #define __vtkMapArrayValues_h
40 
41 #include "vtkRenderingCoreModule.h" // For export macro
43 
44 class vtkMapType;
45 class vtkVariant;
46 
47 class VTKRENDERINGCORE_EXPORT vtkMapArrayValues : public vtkPassInputTypeAlgorithm
48 {
49 public:
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
53  static vtkMapArrayValues *New();
54 
56 
58  vtkSetMacro(FieldType, int);
59  vtkGetMacro(FieldType, int);
61 
63 
66  vtkSetMacro(PassArray, int);
67  vtkGetMacro(PassArray, int);
68  vtkBooleanMacro(PassArray, int);
70 
72 
75  vtkSetMacro(FillValue, double);
76  vtkGetMacro(FillValue, double);
78 
80 
82  vtkSetStringMacro(InputArrayName);
83  vtkGetStringMacro(InputArrayName);
85 
87 
88  vtkSetStringMacro(OutputArrayName);
89  vtkGetStringMacro(OutputArrayName);
91 
93 
95  vtkGetMacro(OutputArrayType, int);
96  vtkSetMacro(OutputArrayType, int);
98 
100 
103  void AddToMap(vtkVariant from, vtkVariant to);
104  void AddToMap(int from, int to);
105  void AddToMap(int from, char *to);
106  void AddToMap(char *from, int to);
107  void AddToMap(char *from, char *to);
109 
111  void ClearMap();
112 
114  int GetMapSize();
115 
116 //BTX
117  // Always keep NUM_ATTRIBUTE_LOCS as the last entry
119  {
120  POINT_DATA=0,
121  CELL_DATA=1,
122  VERTEX_DATA=2,
123  EDGE_DATA=3,
124  ROW_DATA=4,
125  NUM_ATTRIBUTE_LOCS
126  };
127 //ETX
128 
129 protected:
130 
132  virtual ~vtkMapArrayValues();
133 
136 
141  int MapType;
143  double FillValue;
144 
145  // PIMPL idiom to hide map implementation.
146  vtkMapType *Map;
147 
148 private:
149  vtkMapArrayValues(const vtkMapArrayValues&); // Not implemented.
150  void operator=(const vtkMapArrayValues&); // Not implemented.
151 };
152 
153 #endif