Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Save image without uiputfile() prompt

Subject: Save image without uiputfile() prompt

From: machatsk

Date: 23 Aug, 2010 12:36:07

Message: 1 of 5

Hello all,
     Is it possible to save an image without the uiputfile() dialog box? I have a program that creates spectra of compounds, which can then be processed to reduce noise, etc. When a user hits the save button it prompts the user to save the preprocessed image. I would like to save the processed image automatically without prompting the user again. The program can create up to 3 spectra at a time, so prompting for every processed and preprocessed image (6 total) is a bit excessive. I looked at save() but I need to specify a path and default filename.
           Thanks
           Maxx

Subject: Save image without uiputfile() prompt

From: Adam Chapman

Date: 23 Aug, 2010 12:41:26

Message: 2 of 5

On Aug 23, 1:36 pm, "machatsk " <chats...@chemimage.com> wrote:
> Hello all,
>      Is it possible to save an image without the uiputfile() dialog box? I have a program that creates spectra of compounds, which can then be processed to reduce noise, etc. When a user hits the save button it prompts the user to save the preprocessed image. I would like to save the processed image automatically without prompting the user again. The program can create up to 3 spectra at a time, so prompting for every processed and preprocessed image (6 total) is a bit excessive. I looked at save() but I need to specify a path and default filename.
>            Thanks
>            Maxx

help imwrite

Subject: Save image without uiputfile() prompt

From: machatsk

Date: 23 Aug, 2010 12:50:05

Message: 3 of 5

Adam Chapman <adamchapman1985@hotmail.co.uk>
> help imwrite

My image type is not supported here. I have another function that converts the image to .spc format. Thanks

Subject: Save image without uiputfile() prompt

From: Image Analyst

Date: 23 Aug, 2010 13:01:10

Message: 4 of 5

machatsk:
Just create your filename with the functions sprintf() and fullfile(), then pass that filename into your routine that creates your .spc format files and writes it to disk with the filename you just created. In other words, if you already know what filename you want to use, don't ask the user, just create it in code with a simple string, or create it from something else (like numbers and variables) using sprintf(). Then make it a full path by prepending the folder with fullfile().
-ImageAnalyst

Subject: Save image without uiputfile() prompt

From: machatsk

Date: 23 Aug, 2010 13:23:04

Message: 5 of 5

"Image Analyst" <imageanalyst@mailinator.com> wrote in message <i4trem$bi4$1@fred.mathworks.com>...
> machatsk:
> Just create your filename with the functions sprintf() and fullfile(), then pass that filename into your routine that creates your .spc format files and writes it to disk with the filename you just created. In other words, if you already know what filename you want to use, don't ask the user, just create it in code with a simple string, or create it from something else (like numbers and variables) using sprintf(). Then make it a full path by prepending the folder with fullfile().
> -ImageAnalyst

Works great. Thanks Image Analyst.

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us