| 192 | } |
| 193 | |
| 194 | Point 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 | |
| 204 | std::vector<Point> Annotation::getLocalBoundingBox() { |
| 205 | Point center = getCenter(); |