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

Decides what becomes of the regions of a plan that do not fit the file or the array they join. More...

#include <vitrio/image_transfer_sanitizer.hpp>

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

Public Member Functions

 image_transfer_sanitizer (const image_transfer_sanitizer &other)=delete
 
 image_transfer_sanitizer (image_transfer_sanitizer &&other)=delete
 
image_transfer_sanitizer & operator= (const image_transfer_sanitizer &other)=delete
 
image_transfer_sanitizer & operator= (image_transfer_sanitizer &&other)=delete
 
virtual std::vector< image_transfer_plan > sanitize (const image_transfer_plan &regions, span< const std::size_t > file_extents, span< const std::size_t > array_extents) const =0
 Get the plans to transfer in place of a plan.
 

Detailed Description

Decides what becomes of the regions of a plan that do not fit the file or the array they join.

A plan is stated before the extents of its file are known, so a region of it may reach past the file, past the array, or past both. A sanitizer is shown the plan beside the extents of both sides and answers with the plans to transfer in its place, every region of which fits both sides. What one does with a region that does not fit, whether it shortens it, drops it or refuses it, is what tells one sanitizer from another.

Thread safety
sanitize may be called concurrently.

Member Function Documentation

◆ sanitize()

virtual std::vector< image_transfer_plan > vitrio::image_transfer_sanitizer::sanitize ( const image_transfer_plan &  regions,
span< const std::size_t >  file_extents,
span< const std::size_t >  array_extents 
) const
pure virtual

Get the plans to transfer in place of a plan.

Every region of every plan returned fits both sides. The plans have the file rank and the array rank of regions. Their extents may differ from those of regions and from one another, which is why more than one may be returned.

Parameters
regionsThe regions asked for.
file_extentsExtents of the file. Must have the file rank of regions.
array_extentsExtents of the array. Must have the array rank of regions.
Returns
std::vector<image_transfer_plan> The plans to transfer. Empty when nothing is to be transferred.
Exceptions
std::invalid_argumentIf either extents do not have the rank of the side they describe.
std::out_of_rangeIf a region that does not fit is refused.

Implemented in vitrio::clipping_image_transfer_sanitizer, and vitrio::strict_image_transfer_sanitizer.


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