How to save a figure displayed in to a folder?

I have 2 dicom image and I subtract them from each other.Now I want to save the subtracted one in to a folder, but I don't know which type should I choose for saving the image and what should I write for this. My image is a gray scale image and its size is 256*256 . and I have 160 images that I want to save. what should I do? Thanks.

Answers (1)

Since the subtraction can have positive and negative numbers, using uint8 or uint16 is out of the question. I don't know about dicom since I don't use that format. Can it save negative numbers? What are you going to do with the images after you save them? Use them only in MATLAB? If so, then why not just save the image variables as .mat files with save()? If you need other apps, like Photoshop or imageJ, to be able to read them in then you'll have to find a standard image format that takes negative numbers, like maybe TIFF.

4 Comments

In subtraction I omit all the negative numbers, so it start from 0 to positive numbers. I want to save them and then try to find the tumor in them,for example it has 160 slides of a breast MRI and all of them are in dicome file, in slide 32 to 36 it shows the tumor,but when you subtract to series of the slides you are going to see the tumor better and accurately . after saving this all 160 subtracted files in to a folder and finding the best numbers for showing the tumor area I am going to do some other stuff in it in matlab, But I need to save it first and take a look at the subtracted ones. I can save it one by one by clicking save as and choose to save it as Jpeg but it take to much time for 160 slides for every patient and I have 100 patients.
Anyone ??? please help me in this
I use imsave but it saves the binary one and not the grayscale of the image. I mean it turn the grayscale in to a binary image and then save it. What should I do?
See the FAQ for code examples for how to do all 1600 images in a loop. http://matlab.wikia.com/wiki/FAQ#How_can_I_process_a_sequence_of_files.3F

Sign in to comment.

Categories

Asked:

on 14 Apr 2014

Commented:

on 15 Apr 2014

Community Treasure Hunt

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

Start Hunting!