MCPcopy Create free account
hub / github.com/computationalpathologygroup/ASAP / providesCoverage

Method providesCoverage

ASAP/TileManager.cpp:208–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

206}
207
208unsigned char TileManager::providesCoverage(unsigned int level, int tile_x, int tile_y) {
209 std::map<int, std::map<int, unsigned char> >& cover_level = _coverage[level];
210 if (cover_level.empty()) {
211 return 0;
212 }
213
214 if (tile_x < 0 || tile_y < 0) {
215 for (std::map<int, std::map<int, unsigned char> >::iterator it_x = cover_level.begin(); it_x != cover_level.end(); ++it_x) {
216 for (std::map<int, unsigned char>::iterator it_y = it_x->second.begin(); it_y != it_x->second.end(); ++it_y) {
217 if (it_y->second != 2) {
218 return 0;
219 }
220 }
221 }
222 return 2;
223 }
224
225 return cover_level[tile_x][tile_y];
226}
227
228bool TileManager::isCovered(unsigned int level, int tile_x, int tile_y) {
229 if (level > 0) {

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected