Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WindowWidth WindowLevel ImageJ

Chris Tjoumas
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is anyone familiar with calculating minimum and maximum values of image data (I'm guessing this somehow maps to pixel values)? If I open an image in ImageJ and adjust it's window width/window level, I get a different brightness/contrast for the image. I am reading in images from raw data and there are headers that tell me what each images window width and window level should be set at.
I copied out the ImageJ setWindowLevel method from the ImageJ ContrastAdjuster class and tried using that. It really screws up my image - and I am thinking that the code posted online ( is incorrect. I know for a fact that their calculation of levelValue is incorrect, so I'm thinking the values taken from the dialog are not used correctly.
If anyone is familair with getting min/max values from windowwidth/windowlevel, please PLEASE take a look at the code and let me know what might be wrong!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic