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

Method ScaleRadius

Modules/DataTypesExt/src/mitkAffineImageCropperInteractor.cpp:105–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

103}
104
105void mitk::AffineImageCropperInteractor::ScaleRadius(StateMachineAction *, InteractionEvent *interactionEvent)
106{
107 const auto *wheelEvent = dynamic_cast<const MouseWheelEvent *>(interactionEvent);
108 if (wheelEvent == nullptr)
109 return;
110
111 if (m_SelectedNode.IsNull())
112 return;
113
114 double scale = (double)(wheelEvent->GetWheelDelta()) / 64.0;
115 mitk::Point3D newScale;
116 newScale[0] = newScale[1] = newScale[2] = scale;
117
118 mitk::Point3D anchorPoint = wheelEvent->GetPositionInWorld();
119 auto *doOp = new mitk::ScaleOperation(OpSCALE, newScale, anchorPoint);
120 m_SelectedNode->GetData()->GetGeometry()->ExecuteOperation(doOp);
121
122 RenderingManager::GetInstance()->RequestUpdateAll();
123}
124
125void mitk::AffineImageCropperInteractor::InitTranslate(StateMachineAction *, InteractionEvent *interactionEvent)
126{

Callers

nothing calls this directly

Calls 7

GetWheelDeltaMethod · 0.80
GetPositionInWorldMethod · 0.80
GetGeometryMethod · 0.80
IsNullMethod · 0.45
ExecuteOperationMethod · 0.45
GetDataMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected