MCPcopy Create free account
hub / github.com/MITK/MITK / GetActiveLayer

Method GetActiveLayer

Modules/Multilabel/src/mitkLabelSetImage.cpp:253–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

251}
252
253unsigned 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
263unsigned int mitk::MultiLabelSegmentation::GetNumberOfGroups() const
264{

Calls 3

ExistLabelMethod · 0.95
GetGroupIndexOfLabelMethod · 0.95
emptyMethod · 0.45