|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Path-pattern sink that writes one PNG file per accepted frame. More...
#include <ca-png.H>
Public Member Functions | |
| Png_Frame_Sink (std::filesystem::path path_pattern, Mapper mapper, const std::size_t zero_pad=6) | |
| Build a PNG frame sink. | |
| template<typename Lattice > | |
| void | accept (const std::size_t step, const Lattice &frame) |
| Write one PNG frame. | |
Static Public Member Functions | |
| static void | flush () |
| PNG frames are written eagerly; this is a no-op. | |
Private Attributes | |
| std::filesystem::path | pattern_ |
| Mapper | mapper_ |
| std::size_t | zero_pad_ = 6 |
Path-pattern sink that writes one PNG file per accepted frame.
The path pattern may contain {step} or {}; the placeholder is replaced with a zero-padded step number. Parent directories are created lazily before each write.
| Mapper | invocable state_type -> RGB8. |
|
inline |
|
inline |
Write one PNG frame.
| Lattice | 2D lattice type. |
| [in] | step | simulation step. |
| [in] | frame | frame to write. |
Definition at line 262 of file ca-png.H.
References ah_runtime_error_if, Aleph::blossom_maximum_cardinality_matching(), Aleph::CA::format_step_path(), Aleph::CA::Png_Frame_Sink< Mapper >::mapper_, out, Aleph::CA::Png_Frame_Sink< Mapper >::pattern_, Aleph::CA::write_png(), and Aleph::CA::Png_Frame_Sink< Mapper >::zero_pad_.
|
private |
Definition at line 243 of file ca-png.H.
Referenced by Aleph::CA::Png_Frame_Sink< Mapper >::accept().
|
private |
Definition at line 242 of file ca-png.H.
Referenced by Aleph::CA::Png_Frame_Sink< Mapper >::accept().
|
private |
Definition at line 244 of file ca-png.H.
Referenced by Aleph::CA::Png_Frame_Sink< Mapper >::accept().