|
Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
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: vtkFSSurfaceWFileReader.h,v $ 00010 Date: $Date: 2006/05/26 19:40:15 $ 00011 Version: $Revision: 1.5 $ 00012 00013 =========================================================================auto=*/ 00014 00015 #ifndef __vtkFSSurfaceWFileReader_h 00016 #define __vtkFSSurfaceWFileReader_h 00017 00018 #include "FreeSurferConfigure.h" 00019 #include "vtkFreeSurferWin32Header.h" 00020 00021 // VTK includes 00022 #include <vtkDataReader.h> 00023 00024 class vtkFloatArray; 00025 00033 class VTK_FreeSurfer_EXPORT vtkFSSurfaceWFileReader : public vtkDataReader 00034 { 00035 public: 00036 static vtkFSSurfaceWFileReader *New(); 00037 vtkTypeMacro(vtkFSSurfaceWFileReader,vtkDataReader); 00038 void PrintSelf(ostream& os, vtkIndent indent); 00039 00040 vtkFloatArray *GetOutput(); 00041 void SetOutput(vtkFloatArray *output); 00042 00043 int ReadWFile(); 00044 00045 vtkGetMacro(NumberOfVertices,int); 00046 vtkSetMacro(NumberOfVertices,int); 00047 00048 enum 00049 { 00051 FS_ERROR_W_NONE = 0, 00052 FS_ERROR_W_OUTPUT_NULL = 1, 00053 FS_ERROR_W_NO_FILENAME = 2, 00054 FS_ERROR_W_OPEN = 3, 00055 FS_ERROR_W_NUM_VALUES = 4, 00056 FS_ERROR_W_ALLOC = 5, 00057 FS_ERROR_W_EOF = 6, 00059 FS_NEW_SCALAR_MAGIC_NUMBER = 16777215, 00060 }; 00061 00062 protected: 00063 vtkFSSurfaceWFileReader(); 00064 ~vtkFSSurfaceWFileReader(); 00065 00066 vtkFloatArray * Scalars; 00067 00071 int NumberOfVertices; 00072 00073 int ReadInt3 (FILE* iFile, int& oInt); 00074 int ReadInt2 (FILE* iFile, int& oInt); 00075 int ReadFloat (FILE* iFile, float& oInt); 00076 00077 private: 00078 vtkFSSurfaceWFileReader(const vtkFSSurfaceWFileReader&); 00079 void operator=(const vtkFSSurfaceWFileReader&); 00080 }; 00081 00082 #endif
1.7.4