VTK: Filters/General/vtkSplitColumnComponents.h Source File

| 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
33 class vtkInformationIntegerKey;
34 class vtkInformationStringKey;
35
36 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
37 {
38 public:
39 static vtkSplitColumnComponents* New();
40 vtkTypeMacro(vtkSplitColumnComponents, vtkTableAlgorithm);
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:
91 vtkSplitColumnComponents();
92 ~vtkSplitColumnComponents() override;
93
98 std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
99
100 int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) override;
101
102 private:
103 vtkSplitColumnComponents(const vtkSplitColumnComponents&) = delete;
104 void operator=(const vtkSplitColumnComponents&) = delete;
105
106 bool CalculateMagnitudes;
107 int NamingMode;
108 };
109
110 VTK_ABI_NAMESPACE_END
111 #endif
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:24
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:26
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:40
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:72
vtkSplitColumnComponents
split multicomponent table columns
Definition: vtkSplitColumnComponents.h:37
vtkSplitColumnComponents::New
static vtkSplitColumnComponents * New()
vtkSplitColumnComponents::SetNamingModeToNamesWithUnderscores
void SetNamingModeToNamesWithUnderscores()
Get/Set the array naming mode.
Definition: vtkSplitColumnComponents.h:71
vtkSplitColumnComponents::SetNamingModeToNamesWithParens
void SetNamingModeToNamesWithParens()
Get/Set the array naming mode.
Definition: vtkSplitColumnComponents.h:70
vtkSplitColumnComponents::GetComponentLabel
std::string GetComponentLabel(vtkAbstractArray *array, int component_no)
Returns the label to use for the specific component in the array based on this->NamingMode.
vtkSplitColumnComponents::ORIGINAL_COMPONENT_NUMBER
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...
vtkSplitColumnComponents::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkSplitColumnComponents::ORIGINAL_ARRAY_NAME
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...
vtkSplitColumnComponents::SetNamingModeToNumberWithUnderscores
void SetNamingModeToNumberWithUnderscores()
Get/Set the array naming mode.
Definition: vtkSplitColumnComponents.h:69
vtkSplitColumnComponents::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSplitColumnComponents::SetNamingModeToNumberWithParens
void SetNamingModeToNumberWithParens()
Get/Set the array naming mode.
Definition: vtkSplitColumnComponents.h:68
vtkSplitColumnComponents::vtkSplitColumnComponents
vtkSplitColumnComponents()
vtkSplitColumnComponents::~vtkSplitColumnComponents
~vtkSplitColumnComponents() override
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:37
vtkX3D::string
@ string
Definition: vtkX3D.h:490
vtkTableAlgorithm.h