Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
vtkFSSurfaceLabelReader.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 __vtkFSSurfaceLabelReader_h
11 #define __vtkFSSurfaceLabelReader_h
12 
13 #include "FreeSurferConfigure.h"
14 #include "vtkFreeSurferExport.h"
15 
16 // VTK includes
17 #include <vtkDataReader.h>
18 
19 class vtkFloatArray;
20 
29 class VTK_FreeSurfer_EXPORT vtkFSSurfaceLabelReader : public vtkDataReader
30 {
31 public:
32  static vtkFSSurfaceLabelReader *New();
33  vtkTypeMacro(vtkFSSurfaceLabelReader,vtkDataReader);
34  void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE;
35 
36  vtkFloatArray *GetOutput()
37  {return this->Scalars; };
38  void SetOutput(vtkFloatArray *output)
39  {this->Scalars = output; };
40 
41  int ReadLabel();
42 
45  vtkGetMacro(NumberOfVertices,int);
46  vtkSetMacro(NumberOfVertices,int);
47 
51  vtkGetMacro(NumberOfValues, int);
52 
56  vtkGetMacro(LabelOn, float);
57  vtkSetMacro(LabelOn, float);
58 
62  vtkGetMacro(LabelOff, float);
63  vtkSetMacro(LabelOff, float);
64 
65  enum
66  {
68  FS_ERROR_W_NONE = 0,
69  FS_ERROR_W_OUTPUT_NULL = 1,
70  FS_ERROR_W_NO_FILENAME = 2,
71  FS_ERROR_W_OPEN = 3,
72  FS_ERROR_W_NUM_VALUES = 4,
73  FS_ERROR_W_ALLOC = 5,
74  FS_ERROR_W_EOF = 6,
76  FS_NEW_SCALAR_MAGIC_NUMBER = 16777215,
77  };
78 
79 protected:
82 
83  vtkFloatArray *Scalars;
84 
85 
94 
95  float LabelOff;
96  float LabelOn;
97 /*
98  int ReadInt3 (FILE* iFile, int& oInt);
99  int ReadInt2 (FILE* iFile, int& oInt);
100  int ReadFloat (FILE* iFile, float& oInt);
101 */
102 private:
104  void operator=(const vtkFSSurfaceLabelReader&);
105 };
106 
107 #endif
int NumberOfValues
number of values read from file
void SetOutput(vtkFloatArray *output)
Read a label surface overlay file (*.label) from Freesurfer tools.