AliceVision
Photogrammetric Computer Vision Framework
Public Types | Public Member Functions | List of all members
aliceVision::image::CachedTile Class Reference

#include <cache.hpp>

Public Types

using weak_pointer = std::weak_ptr< CachedTile >
 
using smart_pointer = std::shared_ptr< CachedTile >
 

Public Member Functions

 CachedTile (const std::shared_ptr< TileCacheManager > &manager, size_t uid, size_t tileWidth, size_t tileHeight, size_t width, size_t height, size_t depth)
 
size_t getUid () const
 
size_t getTileWidth () const
 
size_t getTileHeight () const
 
size_t getRequiredWidth () const
 
size_t getRequiredHeight () const
 
size_t getDepth () const
 
bool acquire ()
 
void setData (std::unique_ptr< unsigned char > &&data)
 
unsigned char * getDataPointer () const
 
std::unique_ptr< unsigned char > getData ()
 

Detailed Description

A cached tile is an object containing a rectangular region of an image It has a tile width and a tile height. This is the memory used by this tile It also has a required width and a required height. This is the really used part of the tile This is because a tile may be on a border of the image and not fully used. It contains a pointer to its data which may be null if the data is out of core

Member Function Documentation

◆ getData()

std::unique_ptr<unsigned char> aliceVision::image::CachedTile::getData ( )
inline

Move the data. The data is returned and the object property is set to nullptr

◆ getDataPointer()

unsigned char* aliceVision::image::CachedTile::getDataPointer ( ) const
inline

Get a pointer to the contained data

Returns
nullptr if the data is cached

◆ setData()

void aliceVision::image::CachedTile::setData ( std::unique_ptr< unsigned char > &&  data)
inline

Update data with a new buffer Move the data parameter to the _data property.

Note
the parameter is invalidated !

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