VTK  9.1.0
vtkSTLReader.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSTLReader.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=========================================================================*/
144#ifndef vtkSTLReader_h
145#define vtkSTLReader_h
146
148#include "vtkIOGeometryModule.h" // For export macro
149
150class vtkCellArray;
151class vtkFloatArray;
153class vtkPoints;
154
155class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
156{
157public:
159 void PrintSelf(ostream& os, vtkIndent indent) override;
160
164 static vtkSTLReader* New();
165
171
173
176 vtkSetMacro(Merging, vtkTypeBool);
177 vtkGetMacro(Merging, vtkTypeBool);
178 vtkBooleanMacro(Merging, vtkTypeBool);
180
182
185 vtkSetMacro(ScalarTags, vtkTypeBool);
186 vtkGetMacro(ScalarTags, vtkTypeBool);
187 vtkBooleanMacro(ScalarTags, vtkTypeBool);
189
191
196 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
198
208 vtkGetStringMacro(Header);
209
216 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
217
218protected:
220 ~vtkSTLReader() override;
221
226
230 vtkSetStringMacro(Header);
231 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
232
236 char* Header;
238
241 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
242 int GetSTLFileType(const char* filename);
243
244private:
245 vtkSTLReader(const vtkSTLReader&) = delete;
246 void operator=(const vtkSTLReader&) = delete;
247};
248
249#endif
Superclass for algorithms that read models from a file.
object to represent cell connectivity
Definition: vtkCellArray.h:290
dynamic, self-adjusting array of float
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:113
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:143
read ASCII or binary stereo lithography files
Definition: vtkSTLReader.h:156
void SetLocator(vtkIncrementalPointLocator *locator)
Specify a spatial locator for merging points.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIncrementalPointLocator * Locator
Definition: vtkSTLReader.h:235
vtkIncrementalPointLocator * NewDefaultLocator()
Create default locator.
vtkTypeBool ScalarTags
Definition: vtkSTLReader.h:234
int GetSTLFileType(const char *filename)
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkUnsignedCharArray * BinaryHeader
Definition: vtkSTLReader.h:237
static vtkSTLReader * New()
Construct object with merging set to true.
vtkTypeBool Merging
Definition: vtkSTLReader.h:233
int RequestData(vtkInformation *, vtkInformationVector **, vtkInformationVector *) override
This is called by the superclass.
virtual void SetBinaryHeader(vtkUnsignedCharArray *binaryHeader)
~vtkSTLReader() override
bool ReadASCIISTL(FILE *fp, vtkPoints *, vtkCellArray *, vtkFloatArray *scalars=nullptr)
bool ReadBinarySTL(FILE *fp, vtkPoints *, vtkCellArray *)
dynamic, self-adjusting array of unsigned char
int vtkTypeBool
Definition: vtkABI.h:69
vtkTypeUInt32 vtkMTimeType
Definition: vtkType.h:287