Extract image from imtool into variable.

2 views (last 30 days)
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?

Accepted Answer

Image Analyst
Image Analyst on 17 Apr 2013
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.
  6 Comments
Kenny Williams
Kenny Williams on 17 Apr 2013
It's not that I was quitting. I found a function that displayed a desirable image, I was just curious if it allowed the image to be saved instead of displayed. I briefly looked into imadjust (before I found imtool) before, but it only takes values between 0 and 1 so in searching for a function that took the min and max values directly I found imtool. However, having taken another look at imadjust, I've realized I can do basically imadjust(MB, [128 / 1850 25725 / 2^16]) and achieve what I want. So, thank you for directing me to that function again.
Image Analyst
Image Analyst on 17 Apr 2013
Edited: Image Analyst on 17 Apr 2013
You're welcome.

Sign in to comment.

More Answers (1)

Mary
Mary on 17 Feb 2014
hi I want to measure the length of small objects on an image by using a imtool but i like to save the measurement which i got from imtool any one can help on that please?? Many thanks

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!