|
SourceXtractorPlusPlus 1.0.3
SourceXtractor++, the next generation SExtractor
|
#include <TileManager.h>

Public Member Functions | |
| TileManager () | |
| virtual | ~TileManager () |
| void | setOptions (int tile_width, int tile_height, int max_memory) |
| void | flush () |
| std::shared_ptr< ImageTile > | getTileForPixel (int x, int y, std::shared_ptr< const ImageSource > source) |
| void | saveAllTiles () |
| int | getTileWidth () const |
| int | getTileHeight () const |
Static Public Member Functions | |
| static std::shared_ptr< TileManager > | getInstance () |
Private Member Functions | |
| std::shared_ptr< ImageTile > | tryTileFromCache (const TileKey &key) |
| std::shared_ptr< boost::mutex > & | getMutexForImageSource (const ImageSource *) |
| void | removeTile (TileKey tile_key) |
| void | removeExtraTiles () |
| void | addTile (TileKey key, std::shared_ptr< ImageTile > tile) |
Private Attributes | |
| int | m_tile_width |
| int | m_tile_height |
| long | m_max_memory |
| long | m_total_memory_used |
| std::unordered_map< TileKey, std::shared_ptr< ImageTile > > | m_tile_map |
| std::unordered_map< const ImageSource *, std::shared_ptr< boost::mutex > > | m_mutex_map |
| std::list< TileKey > | m_tile_list |
| boost::shared_mutex | m_mutex |
Definition at line 75 of file TileManager.h.
| SourceXtractor::TileManager::TileManager | ( | ) |
Definition at line 42 of file TileManager.cpp.
References m_max_memory, m_tile_height, m_tile_width, and m_total_memory_used.
|
virtual |
Definition at line 46 of file TileManager.cpp.
References SourceXtractor::s_tile_logger, and saveAllTiles().

|
private |
Definition at line 185 of file TileManager.cpp.
References m_tile_list, m_tile_map, m_total_memory_used, and SourceXtractor::s_tile_logger.
Referenced by getTileForPixel().
| void SourceXtractor::TileManager::flush | ( | ) |
Definition at line 63 of file TileManager.cpp.
References m_mutex, m_tile_list, m_tile_map, m_total_memory_used, and saveAllTiles().
Referenced by setOptions().

|
static |
Definition at line 140 of file TileManager.cpp.
References std::make_shared(), and SourceXtractor::s_instance.
Referenced by BenchBackgroundModel::configure(), SourceXtractor::WriteableBufferedImage< T >::create(), SourceXtractor::BFSSegmentation::getTiles(), SourceXtractor::Lutz::labelImage(), BenchBackgroundModel::mainMethod(), SEMain::mainMethod(), TestImage::mainMethod(), and SourceXtractor::BufferedImage< T >::~BufferedImage().

|
private |
Definition at line 94 of file TileManager.cpp.
References m_mutex, m_mutex_map, and std::make_shared().
Referenced by getTileForPixel().

| std::shared_ptr< ImageTile > SourceXtractor::TileManager::getTileForPixel | ( | int | x, |
| int | y, | ||
| std::shared_ptr< const ImageSource > | source ) |
Definition at line 104 of file TileManager.cpp.
References addTile(), std::shared_ptr< T >::get(), getMutexForImageSource(), m_mutex, m_tile_height, m_tile_width, std::min(), removeExtraTiles(), std::static_pointer_cast(), and tryTileFromCache().

| int SourceXtractor::TileManager::getTileHeight | ( | ) | const |
Definition at line 159 of file TileManager.cpp.
References m_tile_height.
| int SourceXtractor::TileManager::getTileWidth | ( | ) | const |
Definition at line 155 of file TileManager.cpp.
References m_tile_width.
|
private |
Definition at line 176 of file TileManager.cpp.
References m_max_memory, m_tile_list, m_total_memory_used, and removeTile().
Referenced by getTileForPixel().

|
private |
Definition at line 163 of file TileManager.cpp.
References m_tile_map, m_total_memory_used, and SourceXtractor::s_tile_logger.
Referenced by removeExtraTiles().
| void SourceXtractor::TileManager::saveAllTiles | ( | ) |
Definition at line 147 of file TileManager.cpp.
References m_mutex, m_tile_list, and m_tile_map.
Referenced by flush(), and ~TileManager().
| void SourceXtractor::TileManager::setOptions | ( | int | tile_width, |
| int | tile_height, | ||
| int | max_memory ) |
Definition at line 54 of file TileManager.cpp.
References flush(), m_max_memory, m_mutex, m_tile_height, and m_tile_width.

|
private |
Definition at line 78 of file TileManager.cpp.
References std::dynamic_pointer_cast(), m_mutex, m_tile_map, and SourceXtractor::s_tile_logger.
Referenced by getTileForPixel().

|
private |
Definition at line 111 of file TileManager.h.
Referenced by removeExtraTiles(), setOptions(), and TileManager().
|
private |
Definition at line 118 of file TileManager.h.
Referenced by flush(), getMutexForImageSource(), getTileForPixel(), saveAllTiles(), setOptions(), and tryTileFromCache().
|
private |
Definition at line 115 of file TileManager.h.
Referenced by getMutexForImageSource().
|
private |
Definition at line 110 of file TileManager.h.
Referenced by getTileForPixel(), getTileHeight(), setOptions(), and TileManager().
Definition at line 116 of file TileManager.h.
Referenced by addTile(), flush(), removeExtraTiles(), and saveAllTiles().
|
private |
Definition at line 114 of file TileManager.h.
Referenced by addTile(), flush(), removeTile(), saveAllTiles(), and tryTileFromCache().
|
private |
Definition at line 110 of file TileManager.h.
Referenced by getTileForPixel(), getTileWidth(), setOptions(), and TileManager().
|
private |
Definition at line 112 of file TileManager.h.
Referenced by addTile(), flush(), removeExtraTiles(), removeTile(), and TileManager().