VTK  9.0.20210301
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:
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 
102 protected:
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
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...
vtkInformationStringKey
Key for string values in vtkInformation.
Definition: vtkInformationStringKey.h:34
vtkSplitColumnComponents::New
static vtkSplitColumnComponents * New()
vtkSplitColumnComponents::SetNamingModeToNumberWithParens
void SetNamingModeToNumberWithParens()
Definition: vtkSplitColumnComponents.h:80
vtkInformationVector
Store zero or more vtkInformation instances.
Definition: vtkInformationVector.h:36
vtkSplitColumnComponents::ORIGINAL_COMPONENT_NUMBER
static vtkInformationIntegerKey * ORIGINAL_COMPONENT_NUMBER()
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::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkSplitColumnComponents
split multicomponent table columns
Definition: vtkSplitColumnComponents.h:49
vtkTableAlgorithm
Superclass for algorithms that produce only vtkTables as output.
Definition: vtkTableAlgorithm.h:49
vtkSplitColumnComponents::SetNamingModeToNamesWithUnderscores
void SetNamingModeToNamesWithUnderscores()
Definition: vtkSplitColumnComponents.h:83
vtkInformationIntegerKey
Key for integer values in vtkInformation.
Definition: vtkInformationIntegerKey.h:32
vtkSplitColumnComponents::SetNamingModeToNumberWithUnderscores
void SetNamingModeToNumberWithUnderscores()
Definition: vtkSplitColumnComponents.h:81
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:34
vtkAbstractArray
Abstract superclass for all arrays.
Definition: vtkAbstractArray.h:76
vtkInformation
Store vtkAlgorithm input/output information.
Definition: vtkInformation.h:74
vtkX3D::string
@ string
Definition: vtkX3D.h:496
vtkSplitColumnComponents::RequestData
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
vtkTableAlgorithm.h
vtkSplitColumnComponents::vtkSplitColumnComponents
vtkSplitColumnComponents()
vtkSplitColumnComponents::~vtkSplitColumnComponents
~vtkSplitColumnComponents() override
vtkSplitColumnComponents::SetNamingModeToNamesWithParens
void SetNamingModeToNamesWithParens()
Definition: vtkSplitColumnComponents.h:82