imagesplit.file.vol_reader module¶
Utility for reading and writing data to vol files
Author: Tom Doel Copyright UCL 2017
-
class
imagesplit.file.vol_reader.
VolFile
(local_image_size, header_filename, file_handle_factory)[source]¶ Bases:
imagesplit.file.image_file_reader.LinearImageFileReader
A class for reading or writing 3D imaging data from vge/vol file pair
-
static
create_read_file
(subimage_descriptor, file_handle_factory)[source]¶ Create a MetaIoFile class for writing
-
get_bytes_per_voxel
()[source]¶ Return the number of bytes used to represent a single voxel in this image.
-
get_dimension_ordering
()[source]¶ Return the preferred dimension ordering for writing data.
Returns an array of 3 element, where each element represents a dimension in the global coordinate system numbered from 1 to 3 and is positive if data are to be written in ascending coordinates (in the global system) or negative if to be written in descending global coordinates along that dimension
-
classmethod
load_and_parse_header
(filename)[source]¶ Load vge header file and parse into FileImageDescriptor
-
static
-
imagesplit.file.vol_reader.
compute_bytes_per_voxel
(file_data_type)[source]¶ Returns number of bytes required to store one voxel for the given ElementType
-
imagesplit.file.vol_reader.
dim_order_from_header
(header)[source]¶ Return the order in which dimensions are stored in the global system. The first element in the array contains the index of the global dimension which is represented by the first dimension in the file, and so on