VTK  9.3.1
vtkSplitColumnComponents.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-FileCopyrightText: Copyright 2008 Sandia Corporation
3 // SPDX-License-Identifier: LicenseRef-BSD-3-Clause-Sandia-NVIDIA-USGov
24 #ifndef vtkSplitColumnComponents_h
25 #define vtkSplitColumnComponents_h
26 
27 #include "vtkFiltersGeneralModule.h" // For export macro
28 #include "vtkTableAlgorithm.h"
29 
30 #include <string> // for std::strin
31 
32 VTK_ABI_NAMESPACE_BEGIN
35 
36 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
37 {
38 public:
39  static vtkSplitColumnComponents* New();
41  void PrintSelf(ostream& os, vtkIndent indent) override;
42 
44 
49  vtkSetMacro(CalculateMagnitudes, bool);
50  vtkGetMacro(CalculateMagnitudes, bool);
51  vtkBooleanMacro(CalculateMagnitudes, bool);
53 
54  enum
55  {
56  NUMBERS_WITH_PARENS = 0, // e.g Points (0)
57  NAMES_WITH_PARENS = 1, // e.g. Points (X)
58  NUMBERS_WITH_UNDERSCORES = 2, // e.g. Points_0
59  NAMES_WITH_UNDERSCORES = 3 // e.g. Points_X
60  };
61 
63 
67  vtkSetClampMacro(NamingMode, int, NUMBERS_WITH_PARENS, NAMES_WITH_UNDERSCORES);
68  void SetNamingModeToNumberWithParens() { this->SetNamingMode(NUMBERS_WITH_PARENS); }
69  void SetNamingModeToNumberWithUnderscores() { this->SetNamingMode(NUMBERS_WITH_UNDERSCORES); }
70  void SetNamingModeToNamesWithParens() { this->SetNamingMode(NAMES_WITH_PARENS); }
71  void SetNamingModeToNamesWithUnderscores() { this->SetNamingMode(NAMES_WITH_UNDERSCORES); }
72  vtkGetMacro(NamingMode, int);
74 
76 
86  static vtkInformationStringKey* ORIGINAL_ARRAY_NAME();
87  static vtkInformationIntegerKey* ORIGINAL_COMPONENT_NUMBER();
89 
90 protected:
92  ~vtkSplitColumnComponents() override;
93 
98  std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
99 
101 
102 private:
104  void operator=(const vtkSplitColumnComponents&) = delete;
105 
106  bool CalculateMagnitudes;
107  int NamingMode;
108 };
109 
110 VTK_ABI_NAMESPACE_END
111 #endif
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTableAlgorithm * New()
Store vtkAlgorithm input/output information.
Abstract superclass for all arrays.
Key for string values in vtkInformation.
a simple class to control print indentation
Definition: vtkIndent.h:28
Key for integer values in vtkInformation.
void SetNamingModeToNumberWithParens()
Get/Set the array naming mode.
void SetNamingModeToNumberWithUnderscores()
Get/Set the array naming mode.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
Superclass for algorithms that produce only vtkTables as output.
void SetNamingModeToNamesWithParens()
Get/Set the array naming mode.
Store zero or more vtkInformation instances.
split multicomponent table columns
void SetNamingModeToNamesWithUnderscores()
Get/Set the array naming mode.