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

Method OnDelete

Modules/Segmentation/src/Interactions/mitkMonaiLabelTool.cpp:158–176  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

156}
157
158void mitk::MonaiLabelTool::OnDelete(StateMachineAction *, InteractionEvent *)
159{
160 if (!this->IsUpdating() && m_PointSetPositive.IsNotNull())
161 {
162 PointSet::Pointer removeSet = m_PointSetPositive;
163 itk::IdentifierType maxId = 0;
164 if (m_PointSetPositive->GetSize() > 0)
165 {
166 maxId = m_PointSetPositive->GetMaxId().Index();
167 }
168 if (m_PointSetNegative->GetSize() > 0 && (maxId < m_PointSetNegative->GetMaxId().Index()))
169 {
170 removeSet = m_PointSetNegative;
171 }
172 removeSet->RemovePointAtEnd(0);
173 --m_PointSetCount;
174 this->UpdatePreview();
175 }
176}
177
178void mitk::MonaiLabelTool::ClearPicks()
179{

Callers

nothing calls this directly

Calls 6

IsUpdatingMethod · 0.80
IsNotNullMethod · 0.80
GetMaxIdMethod · 0.80
RemovePointAtEndMethod · 0.80
UpdatePreviewMethod · 0.80
GetSizeMethod · 0.45

Tested by

no test coverage detected