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
I am working on an image viewer using react-cornerstone-viewport. I have a series where the pilot image is of a different size. This introduces a discrepancy in the viewing experience with the stack scroll or a cine player.
Pilot Image:
2nd Image
I tracked the issue here and tried making some edits to see if things worked.
<CornerstoneViewportisPlaying={this.props.inPlay}frameRate={this.state.frameRate}activeTool={this.state.activeTool}tools={this.state.tools}imageIds={this.state.imageIds}onElementEnabled={(elementEnabledEvt: any)=>{constcornerstoneElement=elementEnabledEvt.detail.element;this.setState({element: cornerstoneElement,});cornerstoneElement.addEventListener("cornerstoneimagerendered",(eventData: any)=>{constviewport=cornerstone.getViewport(element)||{};viewport.voi=viewport.voi||{};viewport.voi.windowWidth=image.windowWidth;viewport.voi.windowCenter=image.windowCenter;if(!viewport.displayedArea){viewport.displayedArea={// Top Left Hand Cornertlhc: {x: 1,y: 1},// Bottom Right Hand Cornerbrhc: {x: 256,y: 256},rowPixelSpacing: 1,columnPixelSpacing: 1,presentationSizeMode: 'None'};}cornerstone.setViewport(cornerstoneElement,viewport);});}}/>
Let me know if you have insights for me. I'll look into the innards of cornerstone to find a possible solution. Doing a cornerstone.reset(this.state.element) after every image render event works, but it does not allow for tooling ofcourse.
The text was updated successfully, but these errors were encountered:
Hi there ,
I am working on an image viewer using react-cornerstone-viewport. I have a series where the pilot image is of a different size. This introduces a discrepancy in the viewing experience with the stack scroll or a cine player.
Pilot Image:
2nd Image
I tracked the issue here and tried making some edits to see if things worked.
Let me know if you have insights for me. I'll look into the innards of cornerstone to find a possible solution. Doing a
cornerstone.reset(this.state.element)
after every image render event works, but it does not allow for tooling ofcourse.The text was updated successfully, but these errors were encountered: