|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
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>

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 ®ions, 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. | |
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.
|
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.
| regions | The regions asked for. |
| file_extents | Extents of the file. Must have the file rank of regions. |
| array_extents | Extents of the array. Must have the array rank of regions. |
| std::invalid_argument | If either extents do not have the rank of the side they describe. |
| std::out_of_range | If a region that does not fit is refused. |
Implemented in vitrio::clipping_image_transfer_sanitizer, and vitrio::strict_image_transfer_sanitizer.