VTK
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 
51 class VTKFILTERSGENERAL_EXPORT vtkSplitColumnComponents : public vtkTableAlgorithm
52 {
53 public:
54  static vtkSplitColumnComponents* New();
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);
84  { this->SetNamingMode(NUMBERS_WITH_PARENS); }
86  { this->SetNamingMode(NUMBERS_WITH_UNDERSCORES); }
88  { this->SetNamingMode(NAMES_WITH_PARENS); }
90  { this->SetNamingMode(NAMES_WITH_UNDERSCORES); }
91  vtkGetMacro(NamingMode, int);
93 
95 
105  static vtkInformationStringKey* ORIGINAL_ARRAY_NAME();
106  static vtkInformationIntegerKey* ORIGINAL_COMPONENT_NUMBER();
108 
109 protected:
111  ~vtkSplitColumnComponents() override;
112 
117  std::string GetComponentLabel(vtkAbstractArray* array, int component_no);
118 
119  int RequestData(
122  vtkInformationVector*) override;
123 
124 private:
126  void operator=(const vtkSplitColumnComponents&) = delete;
127 
128  bool CalculateMagnitudes;
129  int NamingMode;
130 };
131 
132 #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:39
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.