Compare commits
	
		
			2 Commits 
		
	
	
		
			040d9309b9
			...
			ea4f23fb16
		
	
	| Author | SHA1 | Date | 
|---|---|---|
|  | ea4f23fb16 | |
|  | 01d01b1126 | 
|  | @ -189,8 +189,10 @@ export default { | ||||||
|       this.element.oncontextmenu = (e) => e.preventDefault() |       this.element.oncontextmenu = (e) => e.preventDefault() | ||||||
|       resizeObserver.observe(this.element) |       resizeObserver.observe(this.element) | ||||||
|       this.element.addEventListener('CORNERSTONE_STACK_NEW_IMAGE', this.stackNewImage) |       this.element.addEventListener('CORNERSTONE_STACK_NEW_IMAGE', this.stackNewImage) | ||||||
|       this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified) |       // this.element.addEventListener('CORNERSTONE_VOI_MODIFIED', this.voiModified) | ||||||
|  |       // this.element.addEventListener('CORNERSTONE_CAMERA_MODIFIED', this.cameraModified) | ||||||
|        |        | ||||||
|  |       this.element.addEventListener('CORNERSTONE_IMAGE_RENDERED', this.imageRendered) | ||||||
|       this.element.addEventListener('CORNERSTONE_TOOLS_MOUSE_MOVE', this.cornerstoneToolsMouseMove) |       this.element.addEventListener('CORNERSTONE_TOOLS_MOUSE_MOVE', this.cornerstoneToolsMouseMove) | ||||||
|       this.element.addEventListener('mouseleave', () => { |       this.element.addEventListener('mouseleave', () => { | ||||||
|         this.mousePosition.index = [] |         this.mousePosition.index = [] | ||||||
|  | @ -217,6 +219,24 @@ export default { | ||||||
|       // const toolGroup = ToolGroupManager.getToolGroup(toolGroupId) |       // const toolGroup = ToolGroupManager.getToolGroup(toolGroupId) | ||||||
|       // toolGroup.setToolEnabled('ScaleOverlay') |       // toolGroup.setToolEnabled('ScaleOverlay') | ||||||
|     }, |     }, | ||||||
|  |     imageRendered(e) { | ||||||
|  |       const renderingEngine = getRenderingEngine(this.renderingEngineId) | ||||||
|  |       const viewport = renderingEngine.getViewport(this.viewportId) | ||||||
|  |       const properties = viewport.getProperties() | ||||||
|  |       if (properties && properties.voiRange) { | ||||||
|  |         var { lower, upper } = properties.voiRange | ||||||
|  |         const { windowWidth, windowCenter } = csUtils.windowLevel.toWindowLevel( | ||||||
|  |           lower, | ||||||
|  |           upper | ||||||
|  |         ) | ||||||
|  |         this.imageInfo.wwwc = `${Math.round(windowWidth)}/${Math.round(windowCenter)}` | ||||||
|  |       } | ||||||
|  |       const zoom = viewport.getZoom() | ||||||
|  |       this.imageInfo.zoom = zoom.toFixed(4) | ||||||
|  |     }, | ||||||
|  |     cameraModified(e) { | ||||||
|  |       console.log(e) | ||||||
|  |     }, | ||||||
|     voiModified(e) { |     voiModified(e) { | ||||||
|       const renderingEngine = getRenderingEngine(this.renderingEngineId) |       const renderingEngine = getRenderingEngine(this.renderingEngineId) | ||||||
|       const viewport = renderingEngine.getViewport(this.viewportId) |       const viewport = renderingEngine.getViewport(this.viewportId) | ||||||
|  | @ -229,6 +249,8 @@ export default { | ||||||
|         ) |         ) | ||||||
|         this.imageInfo.wwwc = `${Math.round(windowWidth)}/${Math.round(windowCenter)}` |         this.imageInfo.wwwc = `${Math.round(windowWidth)}/${Math.round(windowCenter)}` | ||||||
|       } |       } | ||||||
|  |       const zoom = viewport.getZoom() | ||||||
|  |       this.imageInfo.zoom = zoom.toFixed(4) | ||||||
|     }, |     }, | ||||||
|     getOrientationMarker() { |     getOrientationMarker() { | ||||||
|       const renderingEngine = getRenderingEngine(this.renderingEngineId) |       const renderingEngine = getRenderingEngine(this.renderingEngineId) | ||||||
|  | @ -262,7 +284,6 @@ export default { | ||||||
|     }, |     }, | ||||||
|     resetOrientationMarkers() { |     resetOrientationMarkers() { | ||||||
|       if (this.originalMarkers.length > 0) { |       if (this.originalMarkers.length > 0) { | ||||||
|         console.log(this.originalMarkers) |  | ||||||
|         this.orientationMarkers = [...this.originalMarkers] |         this.orientationMarkers = [...this.originalMarkers] | ||||||
|         this.setMarkers() |         this.setMarkers() | ||||||
|       } |       } | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue