getDefaultViewport api - cornerstonejs/cornerstone GitHub Wiki
The getDefaultViewport api call is an internal API that returns a viewport object with reasonable defaults given a canvas and image object
function getDefaultViewport(canvas, image);
Parameters:
- canvas - the canvas element created for an enabled element
- image - the image object to be displayed in the canvas
Returns: viewport object with the image centered and scaled to fit all pixels