VTK  9.4.20250509
vtkPLYReader.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
144#ifndef vtkPLYReader_h
145#define vtkPLYReader_h
146
148#include "vtkIOPLYModule.h" // For export macro
149#include "vtkResourceStream.h" // For vtkResourceStream
150
151VTK_ABI_NAMESPACE_BEGIN
152class vtkStringArray;
153
154class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
155{
156public:
158 void PrintSelf(ostream& os, vtkIndent indent) override;
159
163 static vtkPLYReader* New();
164
168 static int CanReadFile(VTK_FILEPATH const char* filename);
169
170 vtkGetObjectMacro(Comments, vtkStringArray);
171
176 vtkGetMacro(FaceTextureTolerance, float);
177 vtkSetMacro(FaceTextureTolerance, float);
178
180
188 vtkSetMacro(ReadFromInputString, bool);
189 vtkGetMacro(ReadFromInputString, bool);
190 vtkBooleanMacro(ReadFromInputString, bool);
191 void SetInputString(const std::string& s) { this->InputString = s; }
193
195
199 vtkSetMacro(ReadFromInputStream, bool);
200 vtkGetMacro(ReadFromInputStream, bool);
201 vtkBooleanMacro(ReadFromInputStream, bool);
203
210 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
211 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
212
213protected:
215 ~vtkPLYReader() override;
216
218 // Whether this object is reading from a string or a file.
219 // Default is 0: read from file.
221 // The input string.
222 std::string InputString;
223
224 bool ReadFromInputStream = false;
225
227
228private:
229 vtkPLYReader(const vtkPLYReader&) = delete;
230 void operator=(const vtkPLYReader&) = delete;
231
232 float FaceTextureTolerance;
233 bool DuplicatePointsForFaceTexture;
234};
235
236VTK_ABI_NAMESPACE_END
237#endif
Superclass for algorithms that read models from a file.
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
read Stanford University PLY polygonal file format
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkPLYReader * New()
Construct object with merging set to true.
~vtkPLYReader() override
std::string InputString
vtkStringArray * Comments
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
void SetInputString(const std::string &s)
Enable reading from an InputString instead of the default, a file.
static int CanReadFile(VTK_FILEPATH const char *filename)
A simple, non-exhaustive check to see if a file is a valid ply file.
bool ReadFromInputString
a vtkAbstractArray subclass for strings
#define VTK_FILEPATH