std::string ZDvidUrl::getSupervoxelUrl( uint64_t bodyId, const ZIntCuboid &box) const { std::string url = getSupervoxelUrl(bodyId); return AppendRangeQuery(url, box); #if 0 if (url.empty()) { return ""; } if (!box.isEmpty()) { url += "?minx="; url.appendNumber(box.getFirstCorner().getX()); url += "&maxx="; url.appendNumber(box.getLastCorner().getX()); url += "&miny="; url.appendNumber(box.getFirstCorner().getY()); url += "&maxy="; url.appendNumber(box.getLastCorner().getY()); url += "&minz="; url.appendNumber(box.getFirstCorner().getZ()); url += "&maxz="; url.appendNumber(box.getLastCorner().getZ()); } return url; #endif }
ZObject3dScan ZDvidInfo::getBlockIndex(const ZIntCuboid &box) const { ZIntPoint startIndex = getBlockIndex(box.getFirstCorner()); ZIntPoint endIndex = getBlockIndex(box.getLastCorner()); return ZObject3dFactory::MakeObject3dScan(ZIntCuboid(startIndex, endIndex)); }
std::string ZDvidUrl::AppendRangeQuery( const std::string &url, const ZIntCuboid &box) { ZString query; if (!url.empty() && !box.isEmpty()) { query += "minx="; query.appendNumber(box.getFirstCorner().getX()); query += "&maxx="; query.appendNumber(box.getLastCorner().getX()); query += "&miny="; query.appendNumber(box.getFirstCorner().getY()); query += "&maxy="; query.appendNumber(box.getLastCorner().getY()); query += "&minz="; query.appendNumber(box.getFirstCorner().getZ()); query += "&maxz="; query.appendNumber(box.getLastCorner().getZ()); } return AppendQuery(url, query); }
bool ZIntCuboid::equals(const ZIntCuboid &cuboid) const { return m_firstCorner.equals(cuboid.getFirstCorner()) && m_lastCorner.equals(cuboid.getLastCorner()); }