VTK  9.7.1
vtkPTSReader.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkPTSReader_h
18 #define vtkPTSReader_h
19 
20 #include "vtkBoundingBox.h" // For Bounding Box Data Member
21 #include "vtkIOGeometryModule.h" // For export macro
22 #include "vtkPolyDataAlgorithm.h"
23 #include "vtkSmartPointer.h" // for vtkSmartPointer
24 
25 VTK_ABI_NAMESPACE_BEGIN
26 class vtkResourceStream;
27 class VTKIOGEOMETRY_EXPORT vtkPTSReader : public vtkPolyDataAlgorithm
28 {
29 public:
30  static vtkPTSReader* New();
32  void PrintSelf(ostream& os, vtkIndent indent) override;
33 
35 
38  void SetFileName(VTK_FILEPATH const char* filename);
39  vtkGetFilePathMacro(FileName);
41 
43 
47  void SetStream(vtkResourceStream* stream);
48  vtkResourceStream* GetStream();
50 
52 
58  static bool CanReadFile(VTK_FILEPATH const char* name);
59  static bool CanReadFile(vtkResourceStream* stream);
61 
63 
67  vtkBooleanMacro(LimitReadToBounds, bool);
68  vtkSetMacro(LimitReadToBounds, bool);
69  vtkGetMacro(LimitReadToBounds, bool);
71 
73 
76  vtkSetVector6Macro(ReadBounds, double);
77  vtkGetVector6Macro(ReadBounds, double);
79 
81 
84  vtkBooleanMacro(OutputDataTypeIsDouble, bool);
85  vtkSetMacro(OutputDataTypeIsDouble, bool);
86  vtkGetMacro(OutputDataTypeIsDouble, bool);
88 
90 
94  vtkBooleanMacro(LimitToMaxNumberOfPoints, bool);
95  vtkSetMacro(LimitToMaxNumberOfPoints, bool);
96  vtkGetMacro(LimitToMaxNumberOfPoints, bool);
98 
100 
104  vtkSetClampMacro(MaxNumberOfPoints, vtkIdType, 1, VTK_INT_MAX);
105  vtkGetMacro(MaxNumberOfPoints, vtkIdType);
107 
109 
114  vtkBooleanMacro(CreateCells, bool);
115  vtkSetMacro(CreateCells, bool);
116  vtkGetMacro(CreateCells, bool);
118 
120 
125  vtkBooleanMacro(IncludeColorAndLuminance, bool);
126  vtkSetMacro(IncludeColorAndLuminance, bool);
127  vtkGetMacro(IncludeColorAndLuminance, bool);
129 
133  vtkMTimeType GetMTime() override;
134 
135 protected:
136  vtkPTSReader();
137  ~vtkPTSReader() override;
138 
141 
142  char* FileName = nullptr;
143  bool OutputDataTypeIsDouble = false;
144  bool LimitReadToBounds = false;
145  double ReadBounds[6];
146  bool LimitToMaxNumberOfPoints = false;
147  vtkIdType MaxNumberOfPoints = 1000000;
148  bool CreateCells = true;
149  bool IncludeColorAndLuminance = true;
150 
152 
153 private:
154  vtkPTSReader(const vtkPTSReader&) = delete;
155  void operator=(const vtkPTSReader&) = delete;
156 
158 };
159 
160 VTK_ABI_NAMESPACE_END
161 #endif
Abstract class used for custom streams.
Store vtkAlgorithm input/output information.
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:318
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
This is called by the superclass.
#define VTK_INT_MAX
Definition: vtkType.h:192
int vtkIdType
Definition: vtkType.h:363
static vtkPolyDataAlgorithm * New()
Superclass for algorithms that produce only polydata as output.
a simple class to control print indentation
Definition: vtkIndent.h:28
virtual int RequestInformation(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
virtual vtkMTimeType GetMTime()
Return this object's modified time.
Read ASCII PTS Files.
Definition: vtkPTSReader.h:27
#define VTK_FILEPATH
vtkBoundingBox ReadBBox
Definition: vtkPTSReader.h:151
Store zero or more vtkInformation instances.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
Fast, simple class for representing and operating on 3D bounds.