VTK  9.0.1
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 
48 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
49 {
50 public:
51  static vtkSplitColumnComponents* New();
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 
98  static vtkInformationStringKey* ORIGINAL_ARRAY_NAME();
99  static vtkInformationIntegerKey* ORIGINAL_COMPONENT_NUMBER();
101 
102 protected:
104  ~vtkSplitColumnComponents() override;
105 
110  std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
111 
113 
114 private:
116  void operator=(const vtkSplitColumnComponents&) = delete;
117 
118  bool CalculateMagnitudes;
119  int NamingMode;
120 };
121 
122 #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:33
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.