Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PET Images Adjustable Window Level in MPR #136

Open
Michael-Andersen opened this issue Mar 26, 2021 · 0 comments
Open

PET Images Adjustable Window Level in MPR #136

Michael-Andersen opened this issue Mar 26, 2021 · 0 comments

Comments

@Michael-Andersen
Copy link

Michael-Andersen commented Mar 26, 2021

I noticed using the OHIF Viewer that PET images in 2DMPR mode can't have their window level changed (using the WWWC tool) like CT images can. After some investigation I found that because the range of window width and window center is much smaller with PET then CT the rounding that takes place effectively makes changes impossible.

publicAPI.windowLevelFromMouse = pos => {  
const range = model.volumeActor  
  .getMapper()  
  .getInputData()  
  .getPointData()  
  .getScalars()  
  .getRange();  
const imageDynamicRange = range[1] - range[0];  
const multiplier =  
  Math.round(imageDynamicRange / 1024) * publicAPI.getLevelScale();  
const dx = Math.round((pos[0] - model.wlStartPos[0]) * multiplier);  
const dy = Math.round((pos[1] - model.wlStartPos[1]) * multiplier);  
let windowWidth = model.levels.windowWidth + dx;  
let windowCenter = model.levels.windowCenter - dy; 

from vtkInteractorStyleMPRWindowLevel.js

For PET the multiplier gets rounded to 0 and leaves dx and dy as 0 as well. For reasonable changes to take place in the levels in PET we want dx and dy values between -1 and 1. If I remove all three Math.round calls then I can adjust the window level for both PET and CT with no issues.

If others agree that the rounding here is unnecessary I'd be happy to make a PR to address this. I'm open to other solutions to this issue as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant