[ VIGRA Homepage | Function Index | Class Index | Namespaces | File List | Main Page ]

| ChunkedArrayHDF5< N, T, Alloc > Class Template Reference Chunked arrays |

`#include <vigra/multi_array_chunked_hdf5.hxx>`

Inheritance diagram for ChunkedArrayHDF5< N, T, Alloc >:

## Public Member Functions
| ChunkedArrayHDF5 (HDF5File const &file, std::string const &dataset, HDF5File::OpenMode mode, shape_type const &shape, shape_type const &chunk_shape=shape_type(), ChunkedArrayOptions const &options=ChunkedArrayOptions(), Alloc const &alloc=Alloc())
| Construct with given 'shape', 'chunk_shape' and 'options', using 'alloc' to manage the in-memory version of the data.. More...
| ChunkedArrayHDF5 (HDF5File const &file, std::string const &dataset, HDF5File::OpenMode mode=HDF5File::ReadOnly, ChunkedArrayOptions const &options=ChunkedArrayOptions(), Alloc const &alloc=Alloc())
| Construct for an already existing dataset with given 'options', using 'alloc' to manage the in-memory version of the data. More...
virtual std::size_t | overheadBytesPerChunk () const
| Bytes of main memory needed to manage a single chunk.
Public Member Functions inherited from ChunkedArray< N, T >
std::string | backend () const
| Return the class that implements this ChunkedArray.
iterator | begin ()
| Create a scan-order iterator for the entire chunked array.
const_iterator | begin () const
| Create a read-only scan-order iterator for the entire chunked array.
template<unsigned int M>
MultiArrayView< N-1, T, ChunkedArrayTag > | bind (difference_type_1 index) const
| Create a lower dimensional view to the chunked array. More...
MultiArrayView< N-1, T, ChunkedArrayTag > | bindAt (MultiArrayIndex dim, MultiArrayIndex index) const
| Create a lower dimensional view to the chunked array. More...
MultiArrayView< N-1, T, ChunkedArrayTag > | bindInner (difference_type_1 index) const
| Create a lower dimensional view to the chunked array. More...
template<int M, class Index >
MultiArrayView< N-M, T, ChunkedArrayTag > | bindInner (const TinyVector< Index, M > &d) const
| Create a lower dimensional view to the chunked array. More...
MultiArrayView< N-1, T, ChunkedArrayTag > | bindOuter (difference_type_1 index) const
| Create a lower dimensional view to the chunked array. More...
template<int M, class Index >
MultiArrayView< N-M, T, ChunkedArrayTag > | bindOuter (const TinyVector< Index, M > &d) const
| Create a lower dimensional view to the chunked array. More...
std::size_t | cacheMaxSize () const
| Get the number of chunks the cache will hold. More...
int | cacheSize () const
| Number of chunks currently fitting into the cache.
const_iterator | cbegin () const
| Create a read-only scan-order iterator for the entire chunked array.
const_iterator | cend () const
| Create the end iterator for read-only scan-order iteration over the entire chunked array.
template<class U , class Stride >
void | checkoutSubarray (shape_type const &start, MultiArrayView< N, U, Stride > &subarray) const
| Copy an ROI of the chunked array into an ordinary MultiArrayView. More...
chunk_iterator | chunk_begin (shape_type const &start, shape_type const &stop)
| Create an iterator over all chunks intersected by the given ROI.
chunk_const_iterator | chunk_begin (shape_type const &start, shape_type const &stop) const
| Create a read-only iterator over all chunks intersected by the given ROI.
chunk_const_iterator | chunk_cbegin (shape_type const &start, shape_type const &stop) const
| Create a read-only iterator over all chunks intersected by the given ROI.
chunk_const_iterator | chunk_cend (shape_type const &start, shape_type const &stop) const
| Create the end iterator for read-only iteration over all chunks intersected by the given ROI.
chunk_iterator | chunk_end (shape_type const &start, shape_type const &stop)
| Create the end iterator for iteration over all chunks intersected by the given ROI.
chunk_const_iterator | chunk_end (shape_type const &start, shape_type const &stop) const
| Create the end iterator for read-only iteration over all chunks intersected by the given ROI.
virtual shape_type | chunkArrayShape () const
| Number of chunks along each coordinate direction.
shape_type | chunkShape (shape_type const &chunk_index) const
| Find the shape of the chunk indexed by 'chunk_index'. More...
shape_type const & | chunkShape () const
| Return the global chunk shape. More...
shape_type | chunkStart (shape_type const &global_start) const
| Find the chunk that contains array element 'global_start'.
shape_type | chunkStop (shape_type global_stop) const
| Find the chunk that is beyond array element 'global_stop'. More...
template<class U , class Stride >
void | commitSubarray (shape_type const &start, MultiArrayView< N, U, Stride > const &subarray)
| Copy an ordinary MultiArrayView into an ROI of the chunked array. More...
const_view_type | const_subarray (shape_type const &start, shape_type const &stop) const
| Create a read-only view to the specified ROI. More...
std::size_t | dataBytes () const
| Bytes of main memory occupied by the array's data. More...
std::size_t | dataBytesPerChunk () const
| Number of data bytes in an uncompressed chunk.
iterator | end ()
| Create the end iterator for scan-order iteration over the entire chunked array.
const_iterator | end () const
| Create the end iterator for read-only scan-order iteration over the entire chunked array.
value_type | getItem (shape_type const &point) const
| Read the array element at index 'point'. More...
bool | isInside (shape_type const &p) const
| Check if the given point is in the array domain.
template<class U , class C1 >
bool | operator!= (MultiArrayView< N, U, C1 > const &rhs) const
| Check if two arrays differ in at least one element.
template<class U , class C1 >
bool | operator== (MultiArrayView< N, U, C1 > const &rhs) const
| Check if two arrays are elementwise equal.
std::size_t | overheadBytes () const
| Bytes of main memory needed to manage the chunked storage.
void | releaseChunks (shape_type const &start, shape_type const &stop, bool destroy=false)
void | setCacheMaxSize (std::size_t c)
| Set the number of chunks the cache will hold. More...
void | setItem (shape_type const &point, value_type const &v)
| Write the array element at index 'point'. More...
shape_type const & | shape () const
| Return the shape in this array.
MultiArrayIndex | size () const
| Return the number of elements in this array.
view_type | subarray (shape_type const &start, shape_type const &stop)
| Create a view to the specified ROI. More...
const_view_type | subarray (shape_type const &start, shape_type const &stop) const
| Create a read-only view to the specified ROI. More...

## Detailed Description

### template<unsigned int N, class T, class Alloc = std::allocator<T>>
class vigra::ChunkedArrayHDF5< N, T, Alloc >

Implement ChunkedArray as a chunked dataset in an HDF5 file.

#include <vigra/multi_array_chunked_hdf5.hxx>
Namespace: vigra

This uses the native chunking and compression functionality provided by the HDF5 library. Note: This file must only be included when the HDF5 headers and libraries are installed on the system.

## Constructor & Destructor Documentation

ChunkedArrayHDF5 | ( | HDF5File const & | file,
|  | std::string const & | dataset,
|  | HDF5File::OpenMode | mode,
|  | shape_type const & | shape,
|  | shape_type const & | chunk_shape = `shape_type()`,
|  | ChunkedArrayOptions const & | options = `ChunkedArrayOptions()`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Construct with given 'shape', 'chunk_shape' and 'options', using 'alloc' to manage the in-memory version of the data..

The data are placed in 'file' at the internal path 'dataset'. Argument 'mode' must be one of the following:

- HDF5File::New: Create new dataset, possibly deleting any existing content. It is an error to request this mode when the entire 'file' is read-only.
- HDF5File::Replace: Same as New.
- HDF5File::ReadWrite: Open the dataset for reading and writing. Create the datset if it doesn't exist. It is an error to request this mode when 'file' is read-only.
- HDF5File::ReadOnly: Open the dataset for reading. It is an error to request this mode when the dataset doesn't exist.
- HDF5File::Default: Resolves to ReadOnly when the dataset exists, and to New otherwise.

The supported compression algorithms are:

- ZLIB_FAST: Fast compression using 'zlib' (slower than LZ4, but higher compression).
- ZLIB_BEST: Best compression using 'zlib', slow.
- ZLIB_NONE: Use 'zlib' format without compression.
- DEFAULT_COMPRESSION: Same as ZLIB_FAST.

ChunkedArrayHDF5 | ( | HDF5File const & | file,
|  | std::string const & | dataset,
|  | HDF5File::OpenMode | mode = `HDF5File::ReadOnly`,
|  | ChunkedArrayOptions const & | options = `ChunkedArrayOptions()`,
|  | Alloc const & | alloc = `Alloc()`
| ) |  |

Construct for an already existing dataset with given 'options', using 'alloc' to manage the in-memory version of the data.

The data must be located in 'file' at the internal path 'dataset'. The array's shape and chunk_shape are read from the file. It is an error to use this constructor when 'dataset' doesn't exist.

Argument 'mode' must be one of the following:

- HDF5File::ReadWrite: Open the dataset for reading and writing. It is an error to request this mode when 'file' is read-only.
- HDF5File::ReadOnly: Open the dataset for reading (default).
- HDF5File::Default: Same as ReadOnly.

The supported compression algorithms are:

- ZLIB_FAST: Fast compression using 'zlib' (slower than LZ4, but higher compression).
- ZLIB_BEST: Best compression using 'zlib', slow.
- ZLIB_NONE: Use 'zlib' format without compression.
- DEFAULT_COMPRESSION: Same as ZLIB_FAST.

The documentation for this class was generated from the following file:

- vigra/multi_array_chunked_hdf5.hxx

© Ullrich Köthe (ullrich.koethe@iwr.uni-heidelberg.de) Heidelberg Collaboratory for Image Processing, University of Heidelberg, Germany | html generated using doxygen and Python vigra 1.11.1 (Fri May 19 2017)