VTK  9.2.6
vtkSplitColumnComponents.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSplitColumnComponents.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=========================================================================*/
15/*-------------------------------------------------------------------------
16 Copyright 2008 Sandia Corporation.
17 Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
18 the U.S. Government retains certain rights in this software.
19-------------------------------------------------------------------------*/
40#ifndef vtkSplitColumnComponents_h
41#define vtkSplitColumnComponents_h
42
43#include "vtkFiltersGeneralModule.h" // For export macro
44#include "vtkTableAlgorithm.h"
45
46#include <string> // for std::strin
47
50
51class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
52{
53public:
56 void PrintSelf(ostream& os, vtkIndent indent) override;
57
59
64 vtkSetMacro(CalculateMagnitudes, bool);
65 vtkGetMacro(CalculateMagnitudes, bool);
66 vtkBooleanMacro(CalculateMagnitudes, bool);
68
69 enum
70 {
71 NUMBERS_WITH_PARENS = 0, // e.g Points (0)
72 NAMES_WITH_PARENS = 1, // e.g. Points (X)
73 NUMBERS_WITH_UNDERSCORES = 2, // e.g. Points_0
74 NAMES_WITH_UNDERSCORES = 3 // e.g. Points_X
75 };
76
78
82 vtkSetClampMacro(NamingMode, int, NUMBERS_WITH_PARENS, NAMES_WITH_UNDERSCORES);
83 void SetNamingModeToNumberWithParens() { this->SetNamingMode(NUMBERS_WITH_PARENS); }
84 void SetNamingModeToNumberWithUnderscores() { this->SetNamingMode(NUMBERS_WITH_UNDERSCORES); }
85 void SetNamingModeToNamesWithParens() { this->SetNamingMode(NAMES_WITH_PARENS); }
86 void SetNamingModeToNamesWithUnderscores() { this->SetNamingMode(NAMES_WITH_UNDERSCORES); }
87 vtkGetMacro(NamingMode, int);
89
91
104
105protected:
108
113 std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
114
116
117private:
119 void operator=(const vtkSplitColumnComponents&) = delete;
120
121 bool CalculateMagnitudes;
122 int NamingMode;
123};
124
125#endif
Abstract superclass for all arrays.
a simple class to control print indentation
Definition vtkIndent.h:40
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.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
void SetNamingModeToNumberWithUnderscores()
Get/Set the array naming mode.
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 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.
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() override
Superclass for algorithms that produce only vtkTables as output.