/usr/include/vtk-6.2/vtkMNIObjectReader.h is in libvtk6-dev 6.2.0+dfsg1-10build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 | /*=========================================================================
Program: Visualization Toolkit
Module: vtkMNIObjectReader.h
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
All rights reserved.
See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
/*=========================================================================
Copyright (c) 2006 Atamai, Inc.
Use, modification and redistribution of the software, in source or
binary forms, are permitted provided that the following terms and
conditions are met:
1) Redistribution of the source code, in verbatim or modified
form, must retain the above copyright notice, this license,
the following disclaimer, and any notices that refer to this
license and/or the following disclaimer.
2) Redistribution in binary form must include the above copyright
notice, a copy of this license and the following disclaimer
in the documentation or with other materials provided with the
distribution.
3) Modified copies of the source code must be clearly marked as such,
and must not be misrepresented as verbatim copies of the source code.
THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS"
WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY
MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE
OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF
THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
=========================================================================*/
// .NAME vtkMNIObjectReader - A reader for MNI surface mesh files.
// .SECTION Description
// The MNI .obj file format is used to store geometrical data. This
// file format was developed at the McConnell Brain Imaging Centre at
// the Montreal Neurological Institute and is used by their software.
// Only polygon and line files are supported by this reader, but for
// those formats, all data elements are read including normals, colors,
// and surface properties. ASCII and binary file types are supported.
// .SECTION See Also
// vtkMINCImageReader vtkMNIObjectWriter vtkMNITransformReader
// .SECTION Thanks
// Thanks to David Gobbi for writing this class and Atamai Inc. for
// contributing it to VTK.
#ifndef vtkMNIObjectReader_h
#define vtkMNIObjectReader_h
#include "vtkIOMINCModule.h" // For export macro
#include "vtkPolyDataAlgorithm.h"
class vtkProperty;
class vtkPolyData;
class vtkFloatArray;
class vtkIntArray;
class vtkPoints;
class vtkCellArray;
class VTKIOMINC_EXPORT vtkMNIObjectReader : public vtkPolyDataAlgorithm
{
public:
vtkTypeMacro(vtkMNIObjectReader,vtkPolyDataAlgorithm);
static vtkMNIObjectReader *New();
virtual void PrintSelf(ostream& os, vtkIndent indent);
// Description:
// Set the file name.
vtkSetStringMacro(FileName);
vtkGetStringMacro(FileName);
// Description:
// Get the entension for this file format.
virtual const char* GetFileExtensions() {
return ".obj"; }
// Description:
// Get the name of this file format.
virtual const char* GetDescriptiveName() {
return "MNI object"; }
// Description:
// Test whether the specified file can be read.
virtual int CanReadFile(const char* name);
// Description:
// Get the property associated with the object.
virtual vtkProperty *GetProperty() { return this->Property; };
protected:
vtkMNIObjectReader();
~vtkMNIObjectReader();
char *FileName;
vtkProperty *Property;
int FileType;
istream *InputStream;
int LineNumber;
char *LineText;
char *CharPointer;
int ReadLine(char *text, unsigned int length);
int SkipWhitespace();
int ParseValues(vtkDataArray *array, vtkIdType n);
int ParseIdValue(vtkIdType *value);
int ReadNumberOfPoints(vtkIdType *numCells);
int ReadNumberOfCells(vtkIdType *numCells);
int ReadProperty(vtkProperty *property);
int ReadLineThickness(vtkProperty *property);
int ReadPoints(vtkPolyData *polyData, vtkIdType numPoints);
int ReadNormals(vtkPolyData *polyData, vtkIdType numPoints);
int ReadColors(vtkProperty *property, vtkPolyData *data,
vtkIdType numPoints, vtkIdType numCells);
int ReadCells(vtkPolyData *data, vtkIdType numCells, int cellType);
int ReadPolygonObject(vtkPolyData *output);
int ReadLineObject(vtkPolyData *output);
virtual int ReadFile(vtkPolyData *output);
virtual int RequestData(vtkInformation* request,
vtkInformationVector** inInfo,
vtkInformationVector* outInfo);
private:
vtkMNIObjectReader(const vtkMNIObjectReader&); // Not implemented
void operator=(const vtkMNIObjectReader&); // Not implemented
};
#endif
|