MATLAB: Extract image from imtool into variable.

dicomdisplay rangeimtool

I've found that I can change the display range of a Dicom image using something alone the lines of imtool(MB, [1850 25725]); (or the same with imshow). Instead of displaying it, I want to use the resulting image in my code for further calculation. Is there another function I can use instead that doesn't display the image, or can I extract it automatically from imtool?

Best Answer

You have MB. Somehow you got it, like from dicomread() or somewhere, so you don't need to "extract it" from imtool - you already have it. So just start working with it. You don't need to display it with imshow(), image(), imagesc(), imtool() or anything else. You can work with it just like any other numerical array.