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 "vtkPolyDataAlgorithm.h"
44 
45 class vtkCellArray;
46 class vtkFloatArray;
48 class vtkPoints;
49 
51 {
52 public:
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  static vtkSTLReader *New();
58 
61  unsigned long GetMTime();
62 
64 
65  vtkSetStringMacro(FileName);
66  vtkGetStringMacro(FileName);
68 
70 
71  vtkSetMacro(Merging,int);
72  vtkGetMacro(Merging,int);
73  vtkBooleanMacro(Merging,int);
75 
77 
78  vtkSetMacro(ScalarTags,int);
79  vtkGetMacro(ScalarTags,int);
80  vtkBooleanMacro(ScalarTags,int);
82 
84 
86  void SetLocator(vtkIncrementalPointLocator *locator);
87  vtkGetObjectMacro(Locator,vtkIncrementalPointLocator);
89 
91  void CreateDefaultLocator();
92 
93 protected:
94  vtkSTLReader();
95  ~vtkSTLReader();
96 
97  char *FileName;
98  int Merging;
101 
103  int ReadBinarySTL(FILE *fp, vtkPoints*, vtkCellArray*);
104  int ReadASCIISTL(FILE *fp, vtkPoints*, vtkCellArray*,
105  vtkFloatArray* scalars=0);
106  int GetSTLFileType(const char *filename);
107 private:
108  vtkSTLReader(const vtkSTLReader&); // Not implemented.
109  void operator=(const vtkSTLReader&); // Not implemented.
110 };
111 
112 #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:50
Abstract class in support of both point location and point insertion.
dynamic, self-adjusting array of float
Definition: vtkFloatArray.h:42
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:37
vtkIncrementalPointLocator * Locator
Definition: vtkSTLReader.h:100
char * FileName
Definition: vtkSTLReader.h:97
object to represent cell connectivity
Definition: vtkCellArray.h:48
Store zero or more vtkInformation instances.
#define VTK_IO_EXPORT
represent and manipulate 3D points
Definition: vtkPoints.h:38