VTK  9.6.1
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
37
38#ifndef vtkPLYReader_h
39#define vtkPLYReader_h
40
42#include "vtkIOPLYModule.h" // For export macro
43#include "vtkResourceStream.h" // For vtkResourceStream
44
45VTK_ABI_NAMESPACE_BEGIN
46class vtkStringArray;
47
48class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
49{
50public:
52 void PrintSelf(ostream& os, vtkIndent indent) override;
53
57 static vtkPLYReader* New();
58
62 static int CanReadFile(VTK_FILEPATH const char* filename);
63
64 vtkGetObjectMacro(Comments, vtkStringArray);
65
70 vtkGetMacro(FaceTextureTolerance, float);
71 vtkSetMacro(FaceTextureTolerance, float);
72
74
82 vtkSetMacro(ReadFromInputString, bool);
83 vtkGetMacro(ReadFromInputString, bool);
84 vtkBooleanMacro(ReadFromInputString, bool);
85 void SetInputString(const std::string& s) { this->InputString = s; }
87
89
93 vtkSetMacro(ReadFromInputStream, bool);
94 vtkGetMacro(ReadFromInputStream, bool);
95 vtkBooleanMacro(ReadFromInputStream, bool);
97
104 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
105 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
106
107protected:
109 ~vtkPLYReader() override;
110
112 // Whether this object is reading from a string or a file.
113 // Default is 0: read from file.
115 // The input string.
116 std::string InputString;
117
119
121
122private:
123 vtkPLYReader(const vtkPLYReader&) = delete;
124 void operator=(const vtkPLYReader&) = delete;
125
126 float FaceTextureTolerance;
127 bool DuplicatePointsForFaceTexture;
128};
129
130VTK_ABI_NAMESPACE_END
131#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
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