14 #ifndef vtkDICOMFile_h
15 #define vtkDICOMFile_h
17 #include "vtkSystemIncludes.h"
18 #include "vtkDICOMModule.h"
19 #include "vtkDICOMConfig.h"
22 #define VTK_DICOM_WIN32_IO
24 #define VTK_DICOM_POSIX_IO
56 typedef unsigned long long Size;
78 size_t Read(
unsigned char *data,
size_t size);
85 size_t Write(
const unsigned char *data,
size_t size);
127 static bool SameFile(
const char *file1,
const char *file2);
140 #ifdef VTK_DICOM_POSIX_IO
A class that provides basic input/output operations.
Definition: vtkDICOMFile.h:34
static int Remove(const char *filename)
Delete the specified file (static method).
static bool SameFile(const char *file1, const char *file2)
Check if two files are the same.
Size GetSize()
Check the size of the file, returns ULLONG_MAX on error.
Code
Error codes.
Definition: vtkDICOMFile.h:45
int GetError()
Return an error indicator (zero if no error).
Definition: vtkDICOMFile.h:100
size_t Read(unsigned char *data, size_t size)
Read data from the file.
vtkDICOMFile(const char *filename, Mode mode)
Construct the file object.
static int Access(const char *filename, Mode mode)
Test the specified file for accessibility (static method).
unsigned long long Size
Typedef for a file size.
Definition: vtkDICOMFile.h:56
bool SetPosition(Size offset)
Go to a specific location in the file.
~vtkDICOMFile()
Destruct the object and close the file.
bool EndOfFile()
Check for the end-of-file indicator.
Definition: vtkDICOMFile.h:97
size_t Write(const unsigned char *data, size_t size)
Write data to a file.
Mode
The file mode (input or output).
Definition: vtkDICOMFile.h:38