VTK  9.2.5
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=========================================================================*/
38#ifndef vtkSTLReader_h
39#define vtkSTLReader_h
40
42#include "vtkIOGeometryModule.h" // For export macro
43
44class vtkCellArray;
45class vtkFloatArray;
47class vtkPoints;
48
49class VTKIOGEOMETRY_EXPORT vtkSTLReader : public vtkAbstractPolyDataReader
50{
51public:
53 void PrintSelf(ostream& os, vtkIndent indent) override;
54
58 static vtkSTLReader* New();
59
65
67
70 vtkSetMacro(Merging, vtkTypeBool);
71 vtkGetMacro(Merging, vtkTypeBool);
72 vtkBooleanMacro(Merging, vtkTypeBool);
74
76
79 vtkSetMacro(ScalarTags, vtkTypeBool);
80 vtkGetMacro(ScalarTags, vtkTypeBool);
81 vtkBooleanMacro(ScalarTags, vtkTypeBool);
83
85
90 vtkGetObjectMacro(Locator, vtkIncrementalPointLocator);
92
102 vtkGetStringMacro(Header);
103
110 vtkGetObjectMacro(BinaryHeader, vtkUnsignedCharArray);
111
112protected:
114 ~vtkSTLReader() override;
115
120
124 vtkSetStringMacro(Header);
125 virtual void SetBinaryHeader(vtkUnsignedCharArray* binaryHeader);
126
130 char* Header;
132
135 bool ReadASCIISTL(FILE* fp, vtkPoints*, vtkCellArray*, vtkFloatArray* scalars = nullptr);
136 int GetSTLFileType(const char* filename);
137
138private:
139 vtkSTLReader(const vtkSTLReader&) = delete;
140 void operator=(const vtkSTLReader&) = delete;
141};
142
143#endif
Superclass for algorithms that read models from a file.
object to represent cell connectivity
Definition: vtkCellArray.h:187
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
Abstract class in support of both point location and point insertion.
a simple class to control print indentation
Definition: vtkIndent.h:40
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
represent and manipulate 3D points
Definition: vtkPoints.h:40
read ASCII or binary stereo lithography files
Definition: vtkSTLReader.h:50
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:129
vtkIncrementalPointLocator * NewDefaultLocator()
Create default locator.
vtkTypeBool ScalarTags
Definition: vtkSTLReader.h:128
int GetSTLFileType(const char *filename)
vtkMTimeType GetMTime() override
Overload standard modified time function.
vtkUnsignedCharArray * BinaryHeader
Definition: vtkSTLReader.h:131
static vtkSTLReader * New()
Construct object with merging set to true.
vtkTypeBool Merging
Definition: vtkSTLReader.h:127
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