forked from Slicer/SlicerGitSVNArchive
-
Notifications
You must be signed in to change notification settings - Fork 2
/
vtkFSIO.h
52 lines (39 loc) · 1.81 KB
/
vtkFSIO.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*=auto=========================================================================
Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH) All Rights Reserved.
See COPYRIGHT.txt
or http://www.slicer.org/copyright/copyright.txt for details.
Program: 3D Slicer
Module: $RCSfile: vtkFSIO.h,v $
Date: $Date: 2006/08/08 19:37:40 $
Version: $Revision: 1.10 $
=========================================================================auto=*/
#ifndef __vtkFSIO_h
#define __vtkFSIO_h
#include "vtkFreeSurferWin32Header.h"
// VTK includes
#include <vtk_zlib.h>
// STD includes
#include <cstdio>
/// \brief Some IO functions for irregular FreeSurface files.
///
/// Some simple functions for doing silly things like reading three
/// byte ints, common in FreeSurfer file types.
namespace vtkFSIO {
/// These use FILE types instead of file streams for no good reason,
/// simply because the old code from which this is adapted is C-based.
int VTK_FreeSurfer_EXPORT ReadShort (FILE* iFile, short& oShort);
int VTK_FreeSurfer_EXPORT ReadInt (FILE* iFile, int& oInt);
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);
int VTK_FreeSurfer_EXPORT ReadShortZ (gzFile iFile, short& oShort);
int VTK_FreeSurfer_EXPORT ReadIntZ (gzFile iFile, int& oInt);
int VTK_FreeSurfer_EXPORT ReadInt3Z (gzFile iFile, int& oInt);
int VTK_FreeSurfer_EXPORT ReadInt2Z (gzFile iFile, int& oInt);
int VTK_FreeSurfer_EXPORT ReadFloatZ (gzFile iFile, float& oFloat);
/// For testing purposes
int VTK_FreeSurfer_EXPORT WriteInt (FILE* iFile, int iInt);
int VTK_FreeSurfer_EXPORT WriteInt3 (FILE* iFile, int iInt);
int VTK_FreeSurfer_EXPORT WriteInt2 (FILE* iFile, int iInt);
}
#endif