VTK  9.2.6
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=========================================================================*/
47#ifndef vtkSTLReader_h
48#define vtkSTLReader_h
49
51#include "vtkIOGeometryModule.h" // For export macro
52
53class vtkCellArray;
54class vtkFloatArray;
56class vtkPoints;
57
58class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
59{
60public:
62 void PrintSelf(ostream& os, vtkIndent indent) override;
63
67 static vtkSTLReader* New();
68
74
76
79 vtkSetMacro(Merging, vtkTypeBool);
80 vtkGetMacro(Merging, vtkTypeBool);
81 vtkBooleanMacro(Merging, vtkTypeBool);
83
85
88 vtkSetMacro(ScalarTags, vtkTypeBool);
89 vtkGetMacro(ScalarTags, vtkTypeBool);
90 vtkBooleanMacro(ScalarTags, vtkTypeBool);
92
94
99 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
101
111 vtkGetStringMacro(Header);
112
119 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
120
121protected:
123 ~vtkSTLReader() override;
124
129
133 vtkSetStringMacro(Header);
134 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
135
139 char* Header;
141
144 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
145 int GetSTLFileType(const char* filename);
146
147private:
148 vtkSTLReader(const vtkSTLReader&) = delete;
149 void operator=(const vtkSTLReader&) = delete;
150};
151
152#endif
Superclass for algorithms that read models from a file.
object to represent cell connectivity
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:49
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition vtkPoints.h:49
read ASCII or binary stereo lithography files
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
vtkIncrementalPointLocator * NewDefaultLocator()
Create default locator.
vtkTypeBool ScalarTags
int GetSTLFileType(const char *filename)
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkUnsignedCharArray * BinaryHeader
static vtkSTLReader * New()
Construct object with merging set to true.
vtkTypeBool Merging
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