VTK  9.1.0
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-------------------------------------------------------------------------*/
37#ifndef vtkSplitColumnComponents_h
38#define vtkSplitColumnComponents_h
39
40#include "vtkFiltersGeneralModule.h" // For export macro
41#include "vtkTableAlgorithm.h"
42
43#include <string> // for std::strin
44
47
48class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
49{
50public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
56
61 vtkSetMacro(CalculateMagnitudes, bool);
62 vtkGetMacro(CalculateMagnitudes, bool);
63 vtkBooleanMacro(CalculateMagnitudes, bool);
65
66 enum
67 {
68 NUMBERS_WITH_PARENS = 0, // e.g Points (0)
69 NAMES_WITH_PARENS = 1, // e.g. Points (X)
70 NUMBERS_WITH_UNDERSCORES = 2, // e.g. Points_0
71 NAMES_WITH_UNDERSCORES = 3 // e.g. Points_X
72 };
73
75
79 vtkSetClampMacro(NamingMode, int, NUMBERS_WITH_PARENS, NAMES_WITH_UNDERSCORES);
80 void SetNamingModeToNumberWithParens() { this->SetNamingMode(NUMBERS_WITH_PARENS); }
81 void SetNamingModeToNumberWithUnderscores() { this->SetNamingMode(NUMBERS_WITH_UNDERSCORES); }
82 void SetNamingModeToNamesWithParens() { this->SetNamingMode(NAMES_WITH_PARENS); }
83 void SetNamingModeToNamesWithUnderscores() { this->SetNamingMode(NAMES_WITH_UNDERSCORES); }
84 vtkGetMacro(NamingMode, int);
86
88
101
102protected:
105
110 std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
111
113
114private:
116 void operator=(const vtkSplitColumnComponents&) = delete;
117
118 bool CalculateMagnitudes;
119 int NamingMode;
120};
121
122#endif
Abstract superclass for all arrays.
a simple class to control print indentation
Definition: vtkIndent.h:113
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.