Options
All
  • Public
Menu

Class ScrollAdaptor

Hierarchy

  • ScrollAdaptor

Index

Constructors

constructor

Properties

Private finalspacingindirection

finalspacingindirection: number = 0

Private inProcessofScrolling

inProcessofScrolling: boolean = false

Private initCompleted

initCompleted: boolean = false

Private renderEngine

renderEngine: RenderEngineContext

Private renderParams

renderParams: RenderParams = null

Private resetAdaptorGlobalData

resetAdaptorGlobalData: boolean = false

Private scrollCurrentSlice

scrollCurrentSlice: number = 0

Private scrollData

scrollData: ScrollAdaptorData

Private scrollListener

scrollListener: any

Private scrollTotalSlice

scrollTotalSlice: number = 0

Methods

addMPRScrollListener

  • addMPRScrollListener(listener: any): void
  • Parameters

    • listener: any

    Returns void

Private computeDistancetoScroll

  • computeDistancetoScroll(distance: number, imageY: number, numSlices: number): number
  • Parameters

    • distance: number
    • imageY: number
    • numSlices: number

    Returns number

Private computeNumSlicesIntersectioninDirection

  • computeNumSlicesIntersectioninDirection(viewplane: Plane, volumeboxpoints: Vector[], zVector: Vector, finalSpacing: number, distanceinpixels: number): object
  • Parameters

    • viewplane: Plane
    • volumeboxpoints: Vector[]
    • zVector: Vector
    • finalSpacing: number
    • distanceinpixels: number

    Returns object

    • currentSlice: number
    • intersects: boolean
    • maxallowednegdist: number
    • maxallowedposdist: number
    • numslices: number

Private computeSpacing

  • computeSpacing(zVectorFromTransform: Vector, spacing: Vector): number
  • Parameters

    Returns number

Private getCurrentSlice

  • getCurrentSlice(viewplane: Plane, volumeboxpoints: Vector[], zVector: Vector, finalSpacing: number): any
  • Parameters

    Returns any

getCurrentandTotalSlicefromRP

  • Call this function with render parameters obtained with the image to get the current and total slices The function assumes that the adaptor has been constructed with VolumeDataContext so that volume box parameters are valid This function does not do anything during the scrolling operation itself, rather is helper function to get location in image before it is rendered

    Parameters

    Returns object

    • currentslice: number
    • totalslices: number

init

  • init(): void
  • Call this function to initialize the adaptor called during mouse down and computes certain values like spacing in arbitrary direction, total number of slices

    Returns void

Private processresetAdaptorGlobalData

  • processresetAdaptorGlobalData(): void
  • Returns void

processscrollend

  • processscrollend(): void
  • Inform the ScrollAdaptor class that scrolling has ended, so it will reset cached variables If it is not scrolling, reset immediately, else queue it up to be processed when scrolling computation is finished Either way, subsequent request to scroll function will be rejected

    Returns void

scroll

  • scroll(distance: number, callback: any): void
  • Call this function to perform the scroll put in the distance value and a callback function to call when scrolling is finished

    Parameters

    • distance: number
    • callback: any

    Returns void

Private scrollUpdateTransform

  • scrollUpdateTransform(distance: number, rpCalled: RenderParams, callback: any): void
  • Parameters

    Returns void

Generated using TypeDoc