VTK  9.3.20240327
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::string
31 
32 VTK_ABI_NAMESPACE_BEGIN
35 
36 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
37 {
38 public:
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 
89 
90 protected:
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
Abstract superclass for all arrays.
a simple class to control print indentation
Definition: vtkIndent.h:108
Key for integer values in vtkInformation.
Key for string values in vtkInformation.
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
split multicomponent table columns
static vtkSplitColumnComponents * New()
void SetNamingModeToNamesWithUnderscores()
Get/Set the array naming mode.
void SetNamingModeToNamesWithParens()
Get/Set the array naming mode.
std::string GetComponentLabel(vtkAbstractArray *array, int component_no)
Returns the label to use for the specific component in the array based on this->NamingMode.
static vtkInformationIntegerKey * ORIGINAL_COMPONENT_NUMBER()
These are keys that get added to each output array to make it easier for downstream filters to know w...
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkInformationStringKey * ORIGINAL_ARRAY_NAME()
These are keys that get added to each output array to make it easier for downstream filters to know w...
void SetNamingModeToNumberWithUnderscores()
Get/Set the array naming mode.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetNamingModeToNumberWithParens()
Get/Set the array naming mode.
~vtkSplitColumnComponents() override
Superclass for algorithms that produce only vtkTables as output.
@ string
Definition: vtkX3D.h:490