VTK  9.1.0
vtkPLYReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkPLYReader.h
5
6 Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7 All rights reserved.
8 See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9
10 This software is distributed WITHOUT ANY WARRANTY; without even
11 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12 PURPOSE. See the above copyright notice for more information.
13
14=========================================================================*/
50#ifndef vtkPLYReader_h
51#define vtkPLYReader_h
52
54#include "vtkIOPLYModule.h" // For export macro
55
56class vtkStringArray;
57
58class VTKIOPLY_EXPORT vtkPLYReader : public vtkAbstractPolyDataReader
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
67 static vtkPLYReader* New();
68
72 static int CanReadFile(VTK_FILEPATH const char* filename);
73
74 vtkGetObjectMacro(Comments, vtkStringArray);
75
80 vtkGetMacro(FaceTextureTolerance, float);
81 vtkSetMacro(FaceTextureTolerance, float);
82
84
92 vtkSetMacro(ReadFromInputString, bool);
93 vtkGetMacro(ReadFromInputString, bool);
94 vtkBooleanMacro(ReadFromInputString, bool);
95 void SetInputString(const std::string& s) { this->InputString = s; }
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.
117
119
120private:
121 vtkPLYReader(const vtkPLYReader&) = delete;
122 void operator=(const vtkPLYReader&) = delete;
123
124 float FaceTextureTolerance;
125 bool DuplicatePointsForFaceTexture;
126};
127
128#endif
Superclass for algorithms that read models from a file.
a simple class to control print indentation
Definition: vtkIndent.h:43
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
read Stanford University PLY polygonal file format
Definition: vtkPLYReader.h:59
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
Definition: vtkPLYReader.h:116
vtkStringArray * Comments
Definition: vtkPLYReader.h:111
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.
Definition: vtkPLYReader.h:95
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
Definition: vtkPLYReader.h:114
a vtkAbstractArray subclass for strings
@ string
Definition: vtkX3D.h:496
#define VTK_FILEPATH