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

Method OnDrawing

Modules/Segmentation/src/Interactions/mitkEditableContourTool.cpp:247–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void mitk::EditableContourTool::OnDrawing(StateMachineAction*, InteractionEvent* interactionEvent)
248{
249 auto* positionEvent = dynamic_cast<mitk::InteractionPositionEvent*>(interactionEvent);
250 if (!positionEvent)
251 return;
252
253 m_PreviewContourNode->SetVisibility(false);
254
255 auto contour = this->GetContour();
256 contour->AddVertex(positionEvent->GetPositionInWorld(), false);
257 UpdateClosureContour(positionEvent->GetPositionInWorld());
258
259 assert(positionEvent->GetSender()->GetRenderWindow());
260 mitk::RenderingManager::GetInstance()->RequestUpdate(positionEvent->GetSender()->GetRenderWindow());
261}
262
263void mitk::EditableContourTool::OnEndDrawing(StateMachineAction*, InteractionEvent* interactionEvent)
264{

Callers

nothing calls this directly

Calls 7

GetContourMethod · 0.95
GetPositionInWorldMethod · 0.80
GetSenderMethod · 0.80
SetVisibilityMethod · 0.45
AddVertexMethod · 0.45
GetRenderWindowMethod · 0.45
RequestUpdateMethod · 0.45

Tested by

no test coverage detected