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

Method getCenter

annotation/Annotation.cpp:194–202  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194Point Annotation::getCenter() {
195 Point center(0, 0);
196 if (!_coordinates.empty()) {
197 std::vector<Point> bbox = getImageBoundingBox();
198 center.setX((bbox[0].getX() + bbox[1].getX())/2.);
199 center.setY((bbox[0].getY() + bbox[1].getY()) / 2.);
200 }
201 return center;
202}
203
204std::vector<Point> Annotation::getLocalBoundingBox() {
205 Point center = getCenter();

Callers

nothing calls this directly

Calls 1

emptyMethod · 0.80

Tested by

no test coverage detected