VTK  9.5.20251220
vtkMNIObjectReader.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2// SPDX-FileCopyrightText: Copyright (c) 2006 Atamai, Inc.
3// SPDX-License-Identifier: BSD-3-Clause
23
24#ifndef vtkMNIObjectReader_h
25#define vtkMNIObjectReader_h
26
27#include "vtkIOMINCModule.h" // For export macro
29
30VTK_ABI_NAMESPACE_BEGIN
31class vtkProperty;
32class vtkPolyData;
33class vtkFloatArray;
34class vtkIntArray;
35class vtkPoints;
36class vtkCellArray;
37struct vtkMNIObjectReaderFunctor;
38
39class VTKIOMINC_EXPORT vtkMNIObjectReader : public vtkPolyDataAlgorithm
40{
41public:
43
45 void PrintSelf(ostream& os, vtkIndent indent) override;
46
48
54
58 virtual const char* GetFileExtensions() { return ".obj"; }
59
63 virtual const char* GetDescriptiveName() { return "MNI object"; }
64
68 virtual int CanReadFile(VTK_FILEPATH const char* name);
69
73 virtual vtkProperty* GetProperty() { return this->Property; }
74
75protected:
78
79 char* FileName;
82
83 istream* InputStream;
85 char* LineText;
87
88 int ReadLine(char* text, unsigned int length);
92
95 int ReadProperty(vtkProperty* property);
97 int ReadPoints(vtkPolyData* polyData, vtkIdType numPoints);
98 int ReadNormals(vtkPolyData* polyData, vtkIdType numPoints);
99 int ReadColors(vtkProperty* property, vtkPolyData* data, vtkIdType numPoints, vtkIdType numCells);
100 int ReadCells(vtkPolyData* data, vtkIdType numCells, int cellType);
101
104
105 virtual int ReadFile(vtkPolyData* output);
106
108 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
109
110private:
111 vtkMNIObjectReader(const vtkMNIObjectReader&) = delete;
112 void operator=(const vtkMNIObjectReader&) = delete;
113
115};
116
117VTK_ABI_NAMESPACE_END
118#endif
object to represent cell connectivity
dynamic, self-adjusting array of float
a simple class to control print indentation
Definition vtkIndent.h:108
Store zero or more vtkInformation instances.
Store vtkAlgorithm input/output information.
dynamic, self-adjusting array of int
int ReadLine(char *text, unsigned int length)
int RequestData(vtkInformation *request, vtkInformationVector **inInfo, vtkInformationVector *outInfo) override
This is called by the superclass.
int ReadNormals(vtkPolyData *polyData, vtkIdType numPoints)
int ReadNumberOfPoints(vtkIdType *numCells)
virtual vtkProperty * GetProperty()
Get the property associated with the object.
virtual const char * GetDescriptiveName()
Get the name of this file format.
int ParseValues(vtkDataArray *array, vtkIdType n)
int ReadCells(vtkPolyData *data, vtkIdType numCells, int cellType)
static vtkMNIObjectReader * New()
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int ReadColors(vtkProperty *property, vtkPolyData *data, vtkIdType numPoints, vtkIdType numCells)
virtual int CanReadFile(const char *name)
Test whether the specified file can be read.
int ReadLineThickness(vtkProperty *property)
int ParseIdValue(vtkIdType *value)
~vtkMNIObjectReader() override
int ReadPoints(vtkPolyData *polyData, vtkIdType numPoints)
int ReadNumberOfCells(vtkIdType *numCells)
friend struct vtkMNIObjectReaderFunctor
int ReadProperty(vtkProperty *property)
virtual int ReadFile(vtkPolyData *output)
virtual const char * GetFileExtensions()
Get the extension for this file format.
int ReadPolygonObject(vtkPolyData *output)
vtkSetFilePathMacro(FileName)
Set the file name.
vtkGetFilePathMacro(FileName)
Set the file name.
int ReadLineObject(vtkPolyData *output)
represent and manipulate 3D points
Definition vtkPoints.h:139
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
#define vtkDataArray
int vtkIdType
Definition vtkType.h:368
#define VTK_FILEPATH