Skip to main content

WindowLevelTool

WindowLevel tool manipulates the windowLevel applied to a viewport. It provides a way to set the windowCenter and windowWidth of a viewport by dragging mouse over the image.

Hierarchy

Index

Constructors

constructor

  • new WindowLevelTool(toolProps?: {}, defaultToolProps?: { supportedInteractionTypes: string[] }): default
  • Parameters

    • toolProps: {} = {}
    • defaultToolProps: { supportedInteractionTypes: string[] } = ...

    Returns default

Properties

publicconfiguration

configuration: Record<string, any>

publicmode

mode: ToolModes

Tool Mode - Active/Passive/Enabled/Disabled/

mouseDragCallback

mouseDragCallback: () => void

Type declaration

    • (): void
    • Returns void

publicsupportedInteractionTypes

supportedInteractionTypes: Mouse[]

Supported Interaction Types - currently only Mouse

publictoolGroupId

toolGroupId: string

ToolGroup ID the tool instance belongs to

touchDragCallback

touchDragCallback: () => void

Type declaration

    • (): void
    • Returns void

statictoolName

toolName: string = 'WindowLevel'

Methods

_dragCallback

  • _dragCallback(evt: any): void
  • Parameters

    • evt: any

    Returns void

_getImageDynamicRangeFromMiddleSlice

  • _getImageDynamicRangeFromMiddleSlice(scalarData: any, dimensions: any): number
  • Parameters

    • scalarData: any
    • dimensions: any

    Returns number

_getImageDynamicRangeFromViewport

  • _getImageDynamicRangeFromViewport(viewport: any): number
  • Parameters

    • viewport: any

    Returns number

_getMultiplierFromDynamicRange

  • _getMultiplierFromDynamicRange(viewport: any, volumeId: any): number
  • Parameters

    • viewport: any
    • volumeId: any

    Returns number

publicapplyActiveStrategy

  • applyActiveStrategy(enabledElement: IEnabledElement, operationData: unknown): any
  • It applies the active strategy to the enabled element.


    Parameters

    • enabledElement: IEnabledElement

      The element that is being operated on.

    • operationData: unknown

      The data that needs to be passed to the strategy.

    Returns any

    The result of the strategy.

getNewRange

  • getNewRange(__namedParameters: Object): { lower: number; upper: number }
  • Parameters

    • __namedParameters: Object

    Returns { lower: number; upper: number }

    • lower: number
    • upper: number

getPTNewRange

  • getPTNewRange(__namedParameters: Object): { lower: any; upper: any }
  • Parameters

    • __namedParameters: Object

    Returns { lower: any; upper: any }

    • lower: any
    • upper: any

publicgetToolName

  • getToolName(): string
  • Returns the name of the tool


    Returns string

    The name of the tool.

publicsetActiveStrategy

  • setActiveStrategy(strategyName: string): void
  • Sets the active strategy for a tool. Strategies are multiple implementations of tool behavior that can be switched by tool configuration.


    Parameters

    • strategyName: string

      name of the strategy to be set as active

    Returns void

publicsetConfiguration

  • setConfiguration(newConfiguration: Record<string, any>): void
  • merges the new configuration with the tool configuration


    Parameters

    • newConfiguration: Record<string, any>

    Returns void