VTK  9.5.20250718
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
147#ifndef vtkPLYReader_h
148#define vtkPLYReader_h
149
151#include "vtkIOPLYModule.h" // For export macro
152#include "vtkResourceStream.h" // For vtkResourceStream
153
154VTK_ABI_NAMESPACE_BEGIN
155class vtkStringArray;
156
157class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
158{
159public:
161 void PrintSelf(ostream& os, vtkIndent indent) override;
162
166 static vtkPLYReader* New();
167
171 static int CanReadFile(VTK_FILEPATH const char* filename);
172
173 vtkGetObjectMacro(Comments, vtkStringArray);
174
179 vtkGetMacro(FaceTextureTolerance, float);
180 vtkSetMacro(FaceTextureTolerance, float);
181
183
191 vtkSetMacro(ReadFromInputString, bool);
192 vtkGetMacro(ReadFromInputString, bool);
193 vtkBooleanMacro(ReadFromInputString, bool);
194 void SetInputString(const std::string& s) { this->InputString = s; }
196
198
202 vtkSetMacro(ReadFromInputStream, bool);
203 vtkGetMacro(ReadFromInputStream, bool);
204 vtkBooleanMacro(ReadFromInputStream, bool);
206
213 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
214 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
215
216protected:
218 ~vtkPLYReader() override;
219
221 // Whether this object is reading from a string or a file.
222 // Default is 0: read from file.
224 // The input string.
225 std::string InputString;
226
227 bool ReadFromInputStream = false;
228
230
231private:
232 vtkPLYReader(const vtkPLYReader&) = delete;
233 void operator=(const vtkPLYReader&) = delete;
234
235 float FaceTextureTolerance;
236 bool DuplicatePointsForFaceTexture;
237};
238
239VTK_ABI_NAMESPACE_END
240#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
static int CanReadFile(const char *filename)
A simple, non-exhaustive check to see if a file is a valid ply file.
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.
bool ReadFromInputString
a vtkAbstractArray subclass for strings
#define VTK_FILEPATH