| 372 | } |
| 373 | |
| 374 | void mitk::ROI::AddElement(const Element& element) |
| 375 | { |
| 376 | const auto id = element.GetID(); |
| 377 | |
| 378 | if (m_Elements.count(id) != 0) |
| 379 | mitkThrow() << "ROI already contains an element with ID " << std::to_string(id) << '.'; |
| 380 | |
| 381 | m_Elements[id] = element; |
| 382 | } |
| 383 | |
| 384 | const mitk::ROI::Element& mitk::ROI::GetElement(unsigned int id) const |
| 385 | { |