fitToWindow api - cornerstonejs/cornerstone GitHub Wiki
The fitToWindow api call is used to adjust the viewport properties for translation and scale such that the entire image is displayed within the enabled element. This function will cause the image to immediately be redrawn.
function fitToWindow(element);
Parameters:
- element - the DOM element to fit to window
Returns: Nothing