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
41#ifndef vtkPLYReader_h
42#define vtkPLYReader_h
43
45#include "vtkIOPLYModule.h" // For export macro
46#include "vtkResourceStream.h" // For vtkResourceStream
47
48VTK_ABI_NAMESPACE_BEGIN
49class vtkStringArray;
50
51class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
52{
53public:
55 void PrintSelf(ostream& os, vtkIndent indent) override;
56
60 static vtkPLYReader* New();
61
65 static int CanReadFile(VTK_FILEPATH const char* filename);
66
67 vtkGetObjectMacro(Comments, vtkStringArray);
68
73 vtkGetMacro(FaceTextureTolerance, float);
74 vtkSetMacro(FaceTextureTolerance, float);
75
77
85 vtkSetMacro(ReadFromInputString, bool);
86 vtkGetMacro(ReadFromInputString, bool);
87 vtkBooleanMacro(ReadFromInputString, bool);
88 void SetInputString(const std::string& s) { this->InputString = s; }
90
92
98
100
104 vtkSetMacro(ReadFromInputStream, bool);
105 vtkGetMacro(ReadFromInputStream, bool);
106 vtkBooleanMacro(ReadFromInputStream, bool);
108
115 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
116 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
117
118protected:
120 ~vtkPLYReader() override;
121
123 // Whether this object is reading from a string or a file.
124 // Default is 0: read from file.
126 // The input string.
127 std::string InputString;
128
129 bool ReadFromInputStream = false;
131
133
134private:
135 vtkPLYReader(const vtkPLYReader&) = delete;
136 void operator=(const vtkPLYReader&) = delete;
137
138 float FaceTextureTolerance;
139 bool DuplicatePointsForFaceTexture;
140};
141
142VTK_ABI_NAMESPACE_END
143#endif
Superclass for algorithms that read models from a file.
a simple class to control print indentation
Definition vtkIndent.h:38
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