imagesplit.file.file_wrapper module
Wrapping code for managing virtual images that may consist of multiple
subimages
Author: Tom Doel
Copyright UCL 2017
-
class
imagesplit.file.file_wrapper.
FileHandleFactory
[source]
Bases: object
Creates file handles, allowing for abstraction to virtual files
-
static
create_file_handle
(filename, mode)[source]
Create and open a real file with this path and file access mode
-
class
imagesplit.file.file_wrapper.
FileStreamer
(file_wrapper, image_size, bytes_per_voxel, numpy_format, dimension_ordering)[source]
Bases: object
Handle streaming of image data with arbitrarily large files
-
close
()[source]
Close any files that have been opened.
-
read_line
(start_coords, num_voxels)[source]
Read a line of image data from a binary file at the specified
image location
-
write_line
(start_coords, image_line, rescale_limits)[source]
Write a line of image data to a binary file at the specified image
location
-
class
imagesplit.file.file_wrapper.
FileWrapper
(name, file_handle_factory, mode)[source]
Bases: object
Read or write to arbitrarily large files.
-
close
()[source]
Close the file
-
get_handle
()[source]
Returns the file handle, opening if necessary
-
open
()[source]
Opens the file