|
vitrio 0.1.4
High-throughput image I/O for Cryo-Electron Microscopy (CryoEM)
|
A sanitizer that clips every region to both of its sides. More...
#include <vitrio/clipping_image_transfer_sanitizer.hpp>


Public Member Functions | |
| 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 override |
| Get the plans to transfer in place of a plan. | |
Public Member Functions inherited from vitrio::image_transfer_sanitizer | |
| 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 |
Static Public Member Functions | |
| static const std::shared_ptr< const clipping_image_transfer_sanitizer > & | get_shared () |
| Get the instance every use shares. | |
A sanitizer that clips every region to both of its sides.
A region is cut down to the intersection of what the file holds at its file offset with what the array holds at its array offset, up to the extents of the plan. The intersection begins where the region begins on either side, so clipping only ever shortens the extents and never moves an offset. A region reaching past both sides is shortened by whichever runs out first.
|
static |
Get the instance every use shares.
|
overridevirtual |
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. |
Implements vitrio::image_transfer_sanitizer.