VTK  9.2.6
vtkStringToNumeric.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkStringToNumeric.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-------------------------------------------------------------------------*/
34
35#ifndef vtkStringToNumeric_h
36#define vtkStringToNumeric_h
37
39#include "vtkInfovisCoreModule.h" // For export macro
40
41class VTKINFOVISCORE_EXPORT vtkStringToNumeric : public vtkDataObjectAlgorithm
42{
43public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
49
53 vtkSetMacro(ForceDouble, bool);
54 vtkGetMacro(ForceDouble, bool);
55 vtkBooleanMacro(ForceDouble, bool);
57
59
62 vtkSetMacro(DefaultIntegerValue, int);
63 vtkGetMacro(DefaultIntegerValue, int);
65
67
70 vtkSetMacro(DefaultDoubleValue, double);
71 vtkGetMacro(DefaultDoubleValue, double);
73
75
93
95
98 vtkSetMacro(ConvertFieldData, bool);
99 vtkGetMacro(ConvertFieldData, bool);
100 vtkBooleanMacro(ConvertFieldData, bool);
102
104
107 vtkSetMacro(ConvertPointData, bool);
108 vtkGetMacro(ConvertPointData, bool);
109 vtkBooleanMacro(ConvertPointData, bool);
111
113
116 vtkSetMacro(ConvertCellData, bool);
117 vtkGetMacro(ConvertCellData, bool);
118 vtkBooleanMacro(ConvertCellData, bool);
120
124 virtual void SetConvertVertexData(bool b) { this->SetConvertPointData(b); }
125 virtual bool GetConvertVertexData() { return this->GetConvertPointData(); }
126 vtkBooleanMacro(ConvertVertexData, bool);
127
131 virtual void SetConvertEdgeData(bool b) { this->SetConvertCellData(b); }
132 virtual bool GetConvertEdgeData() { return this->GetConvertCellData(); }
133 vtkBooleanMacro(ConvertEdgeData, bool);
134
138 virtual void SetConvertRowData(bool b) { this->SetConvertPointData(b); }
139 virtual bool GetConvertRowData() { return this->GetConvertPointData(); }
140 vtkBooleanMacro(ConvertRowData, bool);
141
146 vtkInformationVector* outputVector) override;
147
148protected:
151
156 vtkInformationVector* outputVector) override;
157
161 void ConvertArrays(vtkFieldData* fieldData);
162
170
177
178 // These keep track of our progress
181
183
184private:
185 vtkStringToNumeric(const vtkStringToNumeric&) = delete;
186 void operator=(const vtkStringToNumeric&) = delete;
187};
188
189#endif
represent and manipulate fields of data
a simple class to control print indentation
Definition vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int RequestDataObject(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
Creates the same output type as the input type.
int CountItemsToConvert(vtkFieldData *fieldData)
Count the total number of items (array components) that will need to be converted in the given vtkFie...
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
virtual void SetConvertPointData(bool)
Whether to detect and convert cell data arrays.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
virtual void SetConvertRowData(bool b)
Whether to detect and convert row data arrays.
virtual void SetConvertCellData(bool)
Whether to detect and convert point data arrays.
void ConvertArrays(vtkFieldData *fieldData)
Tries to convert string arrays to integer or double arrays.
vtkTypeBool ProcessRequest(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector) override
This is required to capture REQUEST_DATA_OBJECT requests.
virtual void SetConvertEdgeData(bool b)
Whether to detect and convert edge data arrays.
virtual bool GetConvertEdgeData()
virtual bool GetConvertVertexData()
virtual bool GetConvertCellData()
Whether to detect and convert point data arrays.
virtual bool GetConvertRowData()
virtual void SetConvertVertexData(bool b)
Whether to detect and convert vertex data arrays.
virtual bool GetConvertPointData()
Whether to detect and convert cell data arrays.
~vtkStringToNumeric() override
static vtkStringToNumeric * New()
int vtkTypeBool
Definition vtkABI.h:69