VTK
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 =========================================================================*/
40 #ifndef __vtkSTLReader_h
41 #define __vtkSTLReader_h
42 
43 #include "vtkIOGeometryModule.h" // For export macro
44 #include "vtkPolyDataAlgorithm.h"
45 
46 class vtkCellArray;
47 class vtkFloatArray;
49 class vtkPoints;
50 
52 {
53 public:
55  void PrintSelf(ostream& os, vtkIndent indent);
56 
58  static vtkSTLReader *New();
59 
62  unsigned long GetMTime();
63 
65 
66  vtkSetStringMacro(FileName);
67  vtkGetStringMacro(FileName);
69 
71 
72  vtkSetMacro(Merging,int);
73  vtkGetMacro(Merging,int);
74  vtkBooleanMacro(Merging,int);
76 
78 
79  vtkSetMacro(ScalarTags,int);
80  vtkGetMacro(ScalarTags,int);
81  vtkBooleanMacro(ScalarTags,int);
83 
85 
87  void SetLocator(vtkIncrementalPointLocator *locator);
90 
91 protected:
92  vtkSTLReader();
93  ~vtkSTLReader();
94 
96  vtkIncrementalPointLocator* NewDefaultLocator();
97 
98  char *FileName;
99  int Merging;
102 
104  int ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
105  int ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*,
106  vtkFloatArray* scalars=0);
107  int GetSTLFileType(const char *filename);
108 private:
109  vtkSTLReader(const vtkSTLReader&); // Not implemented.
110  void operator=(const vtkSTLReader&); // Not implemented.
111 };
112 
113 #endif
Store vtkAlgorithm input/output information.
virtual int RequestData(vtkInformation *request, vtkInformationVector **inputVector, vtkInformationVector *outputVector)
read ASCII or binary stereo lithography files
Definition: vtkSTLReader.h:51
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
Abstract class in support of both point location and point insertion.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:45
#define vtkSetStringMacro(name)
Definition: vtkSetGet.h:94
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
#define VTKIOGEOMETRY_EXPORT
static vtkPolyDataAlgorithm * New()
void PrintSelf(ostream &os, vtkIndent indent)
Superclass for algorithms that produce only polydata as output.
virtual unsigned long GetMTime()
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkIncrementalPointLocator * Locator
Definition: vtkSTLReader.h:101
#define vtkGetStringMacro(name)
Definition: vtkSetGet.h:120
#define vtkGetObjectMacro(name, type)
Definition: vtkSetGet.h:222
char * FileName
Definition: vtkSTLReader.h:98
object to represent cell connectivity
Definition: vtkCellArray.h:49
Store zero or more vtkInformation instances.
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
represent and manipulate 3D points
Definition: vtkPoints.h:39
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69