Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkFSSurfaceScalarReader.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 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 __vtkFSSurfaceScalarReader_h
11 #define __vtkFSSurfaceScalarReader_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 vtkFSSurfaceScalarReader : public vtkDataReader
29 {
30 public:
31  static vtkFSSurfaceScalarReader *New();
32  vtkTypeMacro(vtkFSSurfaceScalarReader,vtkDataReader);
33  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
34 
35  vtkFloatArray *GetOutput();
36  void SetOutput(vtkFloatArray *output);
37 
39  int ReadFSScalars();
40 
43  enum
44  {
45  FS_NEW_SCALAR_MAGIC_NUMBER = 16777215,
46  };
47 protected:
50 
51  vtkFloatArray * Scalars;
52 
53  int ReadInt3 (FILE* iFile, int& oInt);
54  int ReadInt2 (FILE* iFile, int& oInt);
55  int ReadFloat (FILE* iFile, float& oInt);
56 
57 private:
59  void operator=(const vtkFSSurfaceScalarReader&);
60 };
61 
62 #endif
int VTK_FreeSurfer_EXPORT ReadInt3(FILE *iFile, int &oInt)
int VTK_FreeSurfer_EXPORT ReadInt2(FILE *iFile, int &oInt)
int VTK_FreeSurfer_EXPORT ReadFloat(FILE *iFile, float &oFloat)
Read a surface scalar file from Freesurfer tools.