Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
vtkFSSurfaceLabelReader.h
Go to the documentation of this file.
00001 /*=auto=========================================================================
00002 
00003   Portions (c) Copyright 2006 Brigham and Women's Hospital (BWH) All Rights Reserved.
00004 
00005   See COPYRIGHT.txt
00006   or http://www.slicer.org/copyright/copyright.txt for details.
00007 
00008   Program:   3D Slicer
00009   Module:    $RCSfile: vtkFSSurfaceLabelReader.h,v $
00010   Date:      $Date: 2006/05/26 19:40:15 $
00011   Version:   $Revision: 1.5 $
00012 
00013 =========================================================================auto=*/
00014 
00015 #ifndef __vtkFSSurfaceLabelReader_h
00016 #define __vtkFSSurfaceLabelReader_h
00017 
00018 #include "FreeSurferConfigure.h"
00019 #include "vtkFreeSurferWin32Header.h"
00020 
00021 // VTK includes
00022 #include <vtkDataReader.h>
00023 
00024 class vtkFloatArray;
00025 
00034 class VTK_FreeSurfer_EXPORT vtkFSSurfaceLabelReader : public vtkDataReader
00035 {
00036 public:
00037   static vtkFSSurfaceLabelReader *New();
00038   vtkTypeMacro(vtkFSSurfaceLabelReader,vtkDataReader);
00039   void PrintSelf(ostream& os, vtkIndent indent);
00040 
00041   vtkFloatArray *GetOutput()
00042       {return this->Scalars; };
00043   void SetOutput(vtkFloatArray *output)
00044       {this->Scalars = output; };
00045 
00046   int ReadLabel();
00047 
00050   vtkGetMacro(NumberOfVertices,int);
00051   vtkSetMacro(NumberOfVertices,int);
00052 
00056   vtkGetMacro(NumberOfValues, int);
00057 
00061   vtkGetMacro(LabelOn, float);
00062   vtkSetMacro(LabelOn, float);
00063 
00067   vtkGetMacro(LabelOff, float);
00068   vtkSetMacro(LabelOff, float);
00069 
00070   enum
00071   {
00073     FS_ERROR_W_NONE = 0,
00074     FS_ERROR_W_OUTPUT_NULL = 1,
00075     FS_ERROR_W_NO_FILENAME = 2,
00076     FS_ERROR_W_OPEN = 3,
00077     FS_ERROR_W_NUM_VALUES = 4,
00078     FS_ERROR_W_ALLOC = 5,
00079     FS_ERROR_W_EOF = 6,
00081     FS_NEW_SCALAR_MAGIC_NUMBER = 16777215,
00082   };
00083 
00084 protected:
00085   vtkFSSurfaceLabelReader();
00086   ~vtkFSSurfaceLabelReader();
00087 
00088   vtkFloatArray *Scalars;
00089 
00090 
00095   int NumberOfVertices;
00098   int NumberOfValues;
00099 
00100   float LabelOff;
00101   float LabelOn;
00102 /*
00103   int ReadInt3 (FILE* iFile, int& oInt);
00104   int ReadInt2 (FILE* iFile, int& oInt);
00105   int ReadFloat (FILE* iFile, float& oInt);
00106 */
00107 private:
00108   vtkFSSurfaceLabelReader(const vtkFSSurfaceLabelReader&);  
00109   void operator=(const vtkFSSurfaceLabelReader&);  
00110 };
00111 
00112 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines