VTK  9.6.20260202
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
146
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
169
174 static vtkTypeBool CanReadFile(VTK_FILEPATH const char* filename);
175 static bool CanReadFile(vtkResourceStream* stream);
177
178 vtkGetObjectMacro(Comments, vtkStringArray);
179
184 vtkGetMacro(FaceTextureTolerance, float);
185 vtkSetMacro(FaceTextureTolerance, float);
186
188
196 vtkSetMacro(ReadFromInputString, bool);
197 vtkGetMacro(ReadFromInputString, bool);
198 vtkBooleanMacro(ReadFromInputString, bool);
199 void SetInputString(const std::string& s) { this->InputString = s; }
201
203
207 vtkSetMacro(ReadFromInputStream, bool);
208 vtkGetMacro(ReadFromInputStream, bool);
209 vtkBooleanMacro(ReadFromInputStream, bool);
211
218 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
219 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
220
221protected:
223 ~vtkPLYReader() override;
224
226 // Whether this object is reading from a string or a file.
227 // Default is 0: read from file.
229 // The input string.
230 std::string InputString;
231
233
235
236private:
237 vtkPLYReader(const vtkPLYReader&) = delete;
238 void operator=(const vtkPLYReader&) = delete;
239
240 float FaceTextureTolerance;
241 bool DuplicatePointsForFaceTexture;
242};
243
244VTK_ABI_NAMESPACE_END
245#endif
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
static vtkPLYReader * New()
Construct object with merging set to true.
bool ReadFromInputStream
~vtkPLYReader() override
std::string InputString
static bool CanReadFile(vtkResourceStream *stream)
Return true if, after a quick check of file header, it looks like the provided file or stream can be ...
vtkStringArray * Comments
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
static vtkTypeBool CanReadFile(const char *filename)
Return true if, after a quick check of file header, it looks like the provided file or stream can be ...
void SetInputString(const std::string &s)
Enable reading from an InputString instead of the default, a file.
bool ReadFromInputString
Abstract class used for custom streams.
a vtkAbstractArray subclass for strings
int vtkTypeBool
Definition vtkABI.h:64
#define VTK_FILEPATH