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

Method ScaleRadius

Modules/DataTypesExt/src/mitkSurfaceDeformationDataInteractor3D.cpp:220–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

218}
219
220void mitk::SurfaceDeformationDataInteractor3D::ScaleRadius(StateMachineAction *, InteractionEvent *interactionEvent)
221{
222 const auto *wheelEvent = dynamic_cast<const MouseWheelEvent *>(interactionEvent);
223 if (wheelEvent == nullptr)
224 return;
225
226 m_GaussSigma += (double)(wheelEvent->GetWheelDelta()) / 20;
227 if (m_GaussSigma < 10.0)
228 {
229 m_GaussSigma = 10.0;
230 }
231 else if (m_GaussSigma > 128.0)
232 {
233 m_GaussSigma = 128.0;
234 }
235
236 int timeStep = interactionEvent->GetSender()->GetTimeStep(this->GetDataNode()->GetData());
237 vtkPolyData *polyData = m_Surface->GetVtkPolyData(timeStep);
238
239 // Colorize surface / wireframe dependent on sigma and distance from picked point
240 this->ColorizeSurface(polyData, timeStep, m_SurfaceColorizationCenter, COLORIZATION_GAUSS);
241
242 RenderingManager::GetInstance()->RequestUpdateAll();
243}
244
245void mitk::SurfaceDeformationDataInteractor3D::ColorizeSurface(
246 vtkPolyData *polyData, int timeStep, const Point3D &pickedPoint, int mode, double scalar)

Callers

nothing calls this directly

Calls 8

ColorizeSurfaceMethod · 0.95
GetWheelDeltaMethod · 0.80
GetSenderMethod · 0.80
GetTimeStepMethod · 0.45
GetDataMethod · 0.45
GetDataNodeMethod · 0.45
GetVtkPolyDataMethod · 0.45
RequestUpdateAllMethod · 0.45

Tested by

no test coverage detected