Table of Contents

setContextToDisplayFontSize

Sets the canvas context transformation matrix so it is scaled to show text more cleanly even if the image is scaled up. See https://github.com/cornerstonejs/cornerstoneTools/wiki/DrawingText for more information

Parameters

  • enabledElement
  • context
  • fontSize

Returns {fontSize: number, lineHeight: number, fontScale: number}

triggerEvent

Trigger a CustomEvent

Parameters

  • el EventTarget The element or EventTarget to trigger the event upon
  • type String The event type name
  • detail (Object | null) =null The event data to be sent (optional, default null)

Returns Boolean The return value is false if at least one event listener called preventDefault(). Otherwise it returns true.

convertToVector3

Convert an Array to a cornerstoneMath.Vector3

Parameters

  • arrayOrVector3 (Array | cornerstoneMath.Vector3) Input array or Vector3

Returns cornerstoneMath.Vector3

pauseEvent

This function is used to prevent selection from occuring when left click dragging on the image

Parameters

Returns boolean

playClip

Starts playing a clip of different time series of the same image or adjusts the frame rate of an already playing clip. framesPerSecond is optional and defaults to 30 if not specified. A negative framesPerSecond will play the clip in reverse. The element must have time series

Parameters

  • element
  • framesPerSecond

playClip

Starts playing a clip or adjusts the frame rate of an already playing clip. framesPerSecond is optional and defaults to 30 if not specified. A negative framesPerSecond will play the clip in reverse. The element must be a stack of images

Parameters

  • element
  • framesPerSecond

stopClip

Stops an already playing clip.

  • @param element

Parameters

  • element

stopClip

Stops an already playing clip.

  • @param element

Parameters

  • element

getPlayClipTimeouts

[private] Turns a Frame Time Vector (0018,1065) array into a normalized array of timeouts. Each element ... of the resulting array represents the amount of time each frame will remain on the screen.

Parameters

  • vector Array A Frame Time Vector (0018,1065) as specified in section C.7.6.5.1.2 of DICOM standard.
  • speed Number A speed factor which will be applied to each element of the resulting array.

Returns Array An array with timeouts for each animation frame.

stopClipWithData

[private] Performs the heavy lifting of stopping an ongoing animation.

Parameters

  • playClipData Object The data from playClip that needs to be stopped.

Returns any void

triggerStopEvent

[private] Trigger playClip tool stop event.

Parameters

  • element

Returns any void

mouseUpCallback

Remove the magnifying glass when the mouse event ends

Parameters

  • e

mouseDownCallback

Draw the magnifying glass on mouseDown, and begin tracking mouse movements

Parameters

  • e

mouseDownCallback

Records the start point and attaches the drag event handler

Parameters

  • e

dragCallback

Drag callback is triggered by both the touch and mouse magnify tools

Parameters

  • e

dragCallback

Draws the rectangular region while the touch or mouse event drag occurs

Parameters

  • e

drawMagnificationTool

Draws the magnifying glass

Parameters

  • eventData

createMagnificationCanvas

Creates the magnifying glass canvas

Parameters

  • element

removeMagnificationCanvas

Find the magnifying glass canvas and remove it

Parameters

  • element

calculateMinMaxMean

Calculates the minimum, maximum, and mean value in the given pixel array

Parameters

  • storedPixelLuminanceData
  • globalMin
  • globalMax

applyWWWCRegion

Calculates the minimum and maximum value in the given pixel array

Parameters

  • eventData

recordStartPoint

Records the start point of the click or touch

Parameters

  • eventData

results matching ""

    No results matching ""