VTK  9.7.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
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
60
65 static vtkTypeBool CanReadFile(VTK_FILEPATH const char* filename);
66 static bool CanReadFile(vtkResourceStream* stream);
68
69 vtkGetObjectMacro(Comments, vtkStringArray);
70
75 vtkGetMacro(FaceTextureTolerance, float);
76 vtkSetMacro(FaceTextureTolerance, float);
77
79
87 vtkSetMacro(ReadFromInputString, bool);
88 vtkGetMacro(ReadFromInputString, bool);
89 vtkBooleanMacro(ReadFromInputString, bool);
90 void SetInputString(const std::string& s) { this->InputString = s; }
92
94
98 vtkSetMacro(ReadFromInputStream, bool);
99 vtkGetMacro(ReadFromInputStream, bool);
100 vtkBooleanMacro(ReadFromInputStream, bool);
102
109 vtkGetMacro(DuplicatePointsForFaceTexture, bool);
110 vtkSetMacro(DuplicatePointsForFaceTexture, bool);
111
112protected:
114 ~vtkPLYReader() override;
115
117 // Whether this object is reading from a string or a file.
118 // Default is 0: read from file.
120 // The input string.
121 std::string InputString;
122
124
126
127private:
128 vtkPLYReader(const vtkPLYReader&) = delete;
129 void operator=(const vtkPLYReader&) = delete;
130
131 float FaceTextureTolerance;
132 bool DuplicatePointsForFaceTexture;
133};
134
135VTK_ABI_NAMESPACE_END
136#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
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