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

details ChunkedArrayCompressed< N, T, Alloc > Class Template Reference VIGRA

#include <vigra/multi_array_chunked.hxx>

Inheritance diagram for ChunkedArrayCompressed< N, T, Alloc >:
ChunkedArray< N, T >

Public Member Functions

 ChunkedArrayCompressed (shape_type const &shape, shape_type const &chunk_shape=shape_type(), ChunkedArrayOptions const &options=ChunkedArrayOptions())
 Construct with given 'shape', 'chunk_shape' and 'options'. 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::ChunkedArrayCompressed< N, T, Alloc >

Implement ChunkedArray as a collection of potentially compressed in-memory chunks.

This works like ChunkedArrayLazy, but inactive chunks are compressed when sent asleep. This is especially appropriate for highly compressible data such as label images.

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

Constructor & Destructor Documentation

ChunkedArrayCompressed ( shape_type const &  shape,
shape_type const &  chunk_shape = shape_type(),
ChunkedArrayOptions const &  options = ChunkedArrayOptions() 
)
explicit

Construct with given 'shape', 'chunk_shape' and 'options'.

The most important option concerns the compression algorithm. Supported algorithms are:

  • LZ4: Very fast algorithm that achieves decent compression ratios.
  • 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 LZ4.

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

© 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)