VTK  9.3.0
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
32#ifndef vtkPLYReader_h
33#define vtkPLYReader_h
34
36#include "vtkIOPLYModule.h" // For export macro
37#include "vtkResourceStream.h" // For vtkResourceStream
38
39VTK_ABI_NAMESPACE_BEGIN
40class vtkStringArray;
41
42class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
43{
44public:
46 void PrintSelf(ostream& os, vtkIndent indent) override;
47
51 static vtkPLYReader* New();
52
56 static int CanReadFile(VTK_FILEPATH const char* filename);
57
58 vtkGetObjectMacro(Comments, vtkStringArray);
59
64 vtkGetMacro(FaceTextureTolerance, float);
65 vtkSetMacro(FaceTextureTolerance, float);
66
68
76 vtkSetMacro(ReadFromInputString, bool);
77 vtkGetMacro(ReadFromInputString, bool);
78 vtkBooleanMacro(ReadFromInputString, bool);
79 void SetInputString(const std::string& s) { this->InputString = s; }
81
83
89
91
95 vtkSetMacro(ReadFromInputStream, bool);
96 vtkGetMacro(ReadFromInputStream, bool);
97 vtkBooleanMacro(ReadFromInputStream, bool);
99
106 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
107 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
108
109protected:
111 ~vtkPLYReader() override;
112
114 // Whether this object is reading from a string or a file.
115 // Default is 0: read from file.
117 // The input string.
118 std::string InputString;
119
120 bool ReadFromInputStream = false;
122
124
125private:
126 vtkPLYReader(const vtkPLYReader&) = delete;
127 void operator=(const vtkPLYReader&) = delete;
128
129 float FaceTextureTolerance;
130 bool DuplicatePointsForFaceTexture;
131};
132
133VTK_ABI_NAMESPACE_END
134#endif
Superclass for algorithms that read models from a file.
a simple class to control print indentation
Definition vtkIndent.h:29
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
read Stanford University PLY polygonal file format
vtkSetSmartPointerMacro(Stream, vtkResourceStream)
Specify stream to read from.
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.
vtkGetSmartPointerMacro(Stream, vtkResourceStream)
Specify stream to read from.
bool ReadFromInputString
vtkSmartPointer< vtkResourceStream > Stream
Abstract class used for custom streams.
Hold a reference to a vtkObjectBase instance.
a vtkAbstractArray subclass for strings
#define VTK_FILEPATH