VTK  9.5.2
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
34
35#ifndef vtkPLYReader_h
36#define vtkPLYReader_h
37
39#include "vtkIOPLYModule.h" // For export macro
40#include "vtkResourceStream.h" // For vtkResourceStream
41
42VTK_ABI_NAMESPACE_BEGIN
43class vtkStringArray;
44
45class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
46{
47public:
49 void PrintSelf(ostream& os, vtkIndent indent) override;
50
54 static vtkPLYReader* New();
55
59 static int CanReadFile(VTK_FILEPATH const char* filename);
60
61 vtkGetObjectMacro(Comments, vtkStringArray);
62
67 vtkGetMacro(FaceTextureTolerance, float);
68 vtkSetMacro(FaceTextureTolerance, float);
69
71
79 vtkSetMacro(ReadFromInputString, bool);
80 vtkGetMacro(ReadFromInputString, bool);
81 vtkBooleanMacro(ReadFromInputString, bool);
82 void SetInputString(const std::string& s) { this->InputString = s; }
84
86
90 vtkSetMacro(ReadFromInputStream, bool);
91 vtkGetMacro(ReadFromInputStream, bool);
92 vtkBooleanMacro(ReadFromInputStream, bool);
94
101 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
102 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
103
104protected:
106 ~vtkPLYReader() override;
107
109 // Whether this object is reading from a string or a file.
110 // Default is 0: read from file.
112 // The input string.
113 std::string InputString;
114
116
118
119private:
120 vtkPLYReader(const vtkPLYReader&) = delete;
121 void operator=(const vtkPLYReader&) = delete;
122
123 float FaceTextureTolerance;
124 bool DuplicatePointsForFaceTexture;
125};
126
127VTK_ABI_NAMESPACE_END
128#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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
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