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_saver Class Referenceabstract

Saves the regions of a transaction plan out of one array. More...

#include <vitrio/image_saver.hpp>

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

Public Member Functions

 image_saver (const image_saver &other)=delete
 
 image_saver (image_saver &&other)=delete
 
image_saver & operator= (const image_saver &other)=delete
 
image_saver & operator= (image_saver &&other)=delete
 
virtual std::shared_ptr< completion > save (const_array source, const image_transaction_plan &plan, std::shared_ptr< const image_transfer_sanitizer > sanitizer) const =0
 Save every region a transaction plan names.
 

Detailed Description

Saves the regions of a transaction plan out of one array.

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

Thread safety
save may be called concurrently.
See also
image_loader

Member Function Documentation

◆ save()

virtual std::shared_ptr< completion > vitrio::image_saver::save ( const_array  source,
const image_transaction_plan &  plan,
std::shared_ptr< const image_transfer_sanitizer >  sanitizer 
) const
pure virtual

Save every region a transaction plan names.

May return before the writes are done. The completion returned is ready once every region has been written 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 source, and what it answers is written in their place. What it refuses is reported through the completion.

Parameters
sourceThe values to save.
planThe transaction to save.
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_saver.


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