vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
vitrio::image_loader Class Referenceabstract

Loads the regions of a transaction plan into one array. More...

#include <vitrio/image_loader.hpp>

Inheritance diagram for vitrio::image_loader:
Inheritance graph
[legend]

Public Member Functions

 image_loader (const image_loader &other)=delete
 
 image_loader (image_loader &&other)=delete
 
image_loader & operator= (const image_loader &other)=delete
 
image_loader & operator= (image_loader &&other)=delete
 
virtual std::shared_ptr< completion > load (array destination, const image_transaction_plan &plan, std::shared_ptr< const image_transfer_sanitizer > sanitizer) const =0
 Load every region a transaction plan names.
 

Detailed Description

Loads the regions of a transaction plan into one array.

Every region a plan names is read out of its file and into the array. The reads may still be under way when load returns; the completion it returns says when they are done and reports what failed.

Thread safety
load may be called concurrently.
See also
image_saver

Member Function Documentation

◆ load()

virtual std::shared_ptr< completion > vitrio::image_loader::load ( array  destination,
const image_transaction_plan &  plan,
std::shared_ptr< const image_transfer_sanitizer >  sanitizer 
) const
pure virtual

Load every region a transaction plan names.

May return before the reads are done. The completion returned is ready once every region has been read or has failed, and rethrows what the first failure threw.

The regions of each file are shown to sanitizer beside the extents of that file and of destination, and what it answers is read in their place. What it refuses is reported through the completion. The elements of destination no region reached are left as they were.

Parameters
destinationWhere the regions land.
planThe transaction to load.
sanitizerWhat becomes of the regions that do not fit.
Returns
std::shared_ptr<completion> The completion, never null.
Exceptions
std::invalid_argumentIf sanitizer is null.

Implemented in vitrio::executor_image_loader.


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