| 251 | } |
| 252 | |
| 253 | unsigned int mitk::MultiLabelSegmentation::GetActiveLayer() const |
| 254 | { |
| 255 | if (m_GroupContainer.empty()) mitkThrow() << "Cannot return active group index. No group is available."; |
| 256 | // A stale active value must never abort a caller on the render hot path |
| 257 | // (the 2D mapper queries this every frame); treat it like "no active label". |
| 258 | if (m_ActiveLabelValue == UNLABELED_VALUE || !this->ExistLabel(m_ActiveLabelValue)) return 0; |
| 259 | |
| 260 | return this->GetGroupIndexOfLabel(m_ActiveLabelValue); |
| 261 | } |
| 262 | |
| 263 | unsigned int mitk::MultiLabelSegmentation::GetNumberOfGroups() const |
| 264 | { |