239 std::vector<CanonicalPixelTile<IndexPixel>> tiles_;
240 std::map<PixelTile<IndexPixel>, std::vector<std::size_t>> canonical_forms_;
242 std::size_t capacity_;
A PixelTile representation that stores the canonical (lexicographically minimal) orientation among al...
A template for two-dimensional images with arbitrarily typed pixel values.
A workspace for managing canonical IndexPixel tiles destined for tiles.png output.
bool insert_tile(const CanonicalPixelTile< IndexPixel > &tile)
Attempts to insert a non-transparent tile into the workspace at the current cursor position.
bool at_capacity() const
Checks if the workspace has reached capacity and can no longer accept new tile insertions.
std::optional< std::size_t > first_occurrence_of(const CanonicalPixelTile< IndexPixel > &tile) const
Finds the first occurrence index of a given canonical tile in the workspace.
Image< IndexPixel > export_canonical_image() const
Exports the workspace tiles to an Image<IndexPixel> in canonical form (tiles.png format).
CanonicalPixelTile< IndexPixel > tile_at(std::size_t index) const
Retrieves the canonical tile at the specified index in the workspace.
Image< IndexPixel > export_original_image() const
Exports the workspace tiles to an Image<IndexPixel> in original (pre-canonicalization) form.
std::size_t capacity() const
Returns the maximum number of tiles this workspace can hold.