adjustWindowing method

void adjustWindowing({
  1. required double deltaX,
  2. required double deltaY,
})

Adjusts the Window Center and Width relative to current values.

This is typically called by touch/mouse drag gestures on the DicomViewer.

Implementation

void adjustWindowing({
  required final double deltaX,
  required final double deltaY,
}) {
  if (!hasData) return;

  const sensitivity = 1.5;
  updateWindowing(
    center: _currentWindowCenter! + (deltaY * sensitivity),
    width: _currentWindowWidth! + (deltaX * sensitivity),
  );
}