VTK  9.5.20250810
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
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;
37
38class VTKIOMINC_EXPORT vtkMNIObjectReader : public vtkPolyDataAlgorithm
39{
40public:
42
44 void PrintSelf(ostream& os, vtkIndent indent) override;
45
47
53
57 virtual const char* GetFileExtensions() { return ".obj"; }
58
62 virtual const char* GetDescriptiveName() { return "MNI object"; }
63
67 virtual int CanReadFile(VTK_FILEPATH const char* name);
68
72 virtual vtkProperty* GetProperty() { return this->Property; }
73
74protected:
77
78 char* FileName;
81
82 istream* InputStream;
84 char* LineText;
86
87 int ReadLine(char* text, unsigned int length);
91
94 int ReadProperty(vtkProperty* property);
96 int ReadPoints(vtkPolyData* polyData, vtkIdType numPoints);
97 int ReadNormals(vtkPolyData* polyData, vtkIdType numPoints);
98 int ReadColors(vtkProperty* property, vtkPolyData* data, vtkIdType numPoints, vtkIdType numCells);
99 int ReadCells(vtkPolyData* data, vtkIdType numCells, int cellType);
100
103
104 virtual int ReadFile(vtkPolyData* output);
105
107 vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) override;
108
109private:
110 vtkMNIObjectReader(const vtkMNIObjectReader&) = delete;
111 void operator=(const vtkMNIObjectReader&) = delete;
112};
113
114VTK_ABI_NAMESPACE_END
115#endif
object to represent cell connectivity
abstract superclass for arrays of numeric data
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
A reader for MNI surface mesh files.
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)
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
Superclass for algorithms that produce only polydata as output.
concrete dataset represents vertices, lines, polygons, and triangle strips
represent surface properties of a geometric object
int vtkIdType
Definition vtkType.h:332
#define VTK_FILEPATH