Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkFSSurfaceWFileReader.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2006 Brigham and Women's Hospital (BWH) All Rights Reserved.
4 
5  See COPYRIGHT.txt
6  or http://www.slicer.org/copyright/copyright.txt for details.
7 
8 =========================================================================auto=*/
9 
10 #ifndef __vtkFSSurfaceWFileReader_h
11 #define __vtkFSSurfaceWFileReader_h
12 
13 #include "FreeSurferConfigure.h"
14 #include "vtkFreeSurferExport.h"
15 
16 // VTK includes
17 #include <vtkDataReader.h>
18 
19 class vtkFloatArray;
20 
28 class VTK_FreeSurfer_EXPORT vtkFSSurfaceWFileReader : public vtkDataReader
29 {
30 public:
31  static vtkFSSurfaceWFileReader *New();
32  vtkTypeMacro(vtkFSSurfaceWFileReader,vtkDataReader);
33  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
34 
35  vtkFloatArray *GetOutput();
36  void SetOutput(vtkFloatArray *output);
37 
38  int ReadWFile();
39 
40  vtkGetMacro(NumberOfVertices,int);
41  vtkSetMacro(NumberOfVertices,int);
42 
43  enum
44  {
46  FS_ERROR_W_NONE = 0,
47  FS_ERROR_W_OUTPUT_NULL = 1,
48  FS_ERROR_W_NO_FILENAME = 2,
49  FS_ERROR_W_OPEN = 3,
50  FS_ERROR_W_NUM_VALUES = 4,
51  FS_ERROR_W_ALLOC = 5,
52  FS_ERROR_W_EOF = 6,
54  FS_NEW_SCALAR_MAGIC_NUMBER = 16777215,
55  };
56 
57 protected:
60 
61  vtkFloatArray * Scalars;
62 
67 
68  int ReadInt3 (FILE* iFile, int& oInt);
69  int ReadInt2 (FILE* iFile, int& oInt);
70  int ReadFloat (FILE* iFile, float& oInt);
71 
72 private:
74  void operator=(const vtkFSSurfaceWFileReader&);
75 };
76 
77 #endif
int VTK_FreeSurfer_EXPORT ReadInt3(FILE *iFile, int &oInt)
int VTK_FreeSurfer_EXPORT ReadInt2(FILE *iFile, int &oInt)
Read a surface w file (*.w) file from Freesurfer tools.
int VTK_FreeSurfer_EXPORT ReadFloat(FILE *iFile, float &oFloat)