httomo.runner.block_split.BlockSplitter

httomo.runner.block_split.BlockSplitter#

class httomo.runner.block_split.BlockSplitter(source: DataSetSource, max_slices: int)[source]#

Produces blocks from a DataSetSource according to the given max slices per block. It provides an iterator interface, so that it can be used as:

splitter = BlockSplitter(source, max_slices)
for block in splitter:
    process_block(block)

Where a block is a DataSet instance.

Note that a slice of the data is returned and no copy is made.

Methods

__init__(source, max_slices)

Attributes

property slices_per_block: int#