You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Chris Hafey edited this page Apr 16, 2014
·
5 revisions
The Pixel Coordinate System is used when referring to individual pixels in the image and supports subpixel precision. The origin of the coordinate system is such that 0.0,0.0 is the top left corner of the top left pixel in the image and columns,rows would be the bottom right corner of the bottom right pixel in the image. A coordinate of .5,.5 is therefore the center of the top left pixel.
NOTES:
The function pageToPixel() can be used to convert coordinates obtained from browser events to coordinates
in the pixel coordinate system.
The function setToPixelCoordinateSystem() can be used to set the canvas context to the pixel coordinate system. This is useful when handling the CornerstoneImageRendered event to draw geometry on top of the image.
This coordinate system matches that specified in the DICOM Grayscale Softcopy Presentation State Graphic Annotation module for graphics drawn using the PIXEL annotation units.
Use Math.ceil() to convert from the pixel coordinate system to the integer pixel number (for looking up the pixel value in the pixel data)