iptsetpref

Set Image Processing Toolbox preferences or display valid values

Description

example

iptsetpref(prefname) displays the valid values for the Image Processing Toolbox™ preference specified by prefname.

iptsetpref(prefname,prefvalue) sets the Image Processing Toolbox preference specified by the prefname to the value specified by prefvalue. The setting persists until you change it.

You can also use the Image Processing Toolbox Preferences dialog box to set the preferences. To access the dialog box, click Preferences on the Home tab in the MATLAB® desktop, or call the iptprefs function.

Examples

collapse all

iptsetpref('ImshowBorder','tight')

Input Arguments

collapse all

Name of an Image Processing Toolbox preference, specified as one of the following character vectors.

The following table details the available preferences and their syntaxes. Note that preference names are case insensitive and you can abbreviate them. The default value appears enclosed in braces ({}).

Image Processing Toolbox Preferences

Preference Name

Description

'ImshowAxesVisible'

Controls whether imshow displays images with the axes box and tick labels. Possible values:

'on' — Include axes box and tick labels.

{'off'} — Do not include axes box and tick labels.

'ImshowBorder'

Controls whether imshow includes a border around the image in the figure window. Possible values:

{'loose'} — Include a border between the image and the edges of the figure window, thus leaving room for axes labels, titles, etc.

'tight' — Adjust the figure size so that the image entirely fills the figure.

Note

There still can be a border if the image is very small, or if there are other objects besides the image and its axes in the figure.

You can override this preference by specifying the 'Border' parameter when you call imshow.

'ImshowInitialMagnification'

Controls the initial magnification of the image displayed by imshow. Possible values:

Any numeric value — imshow interprets numeric values as a percentage. The default value is 100. A magnification of 100% means that there should be one screen pixel for every image pixel.

'fit' — Scale the image so that it fits into the window in its entirety.

You can override this preference by specifying the 'InitialMagnification' parameter when you call imshow, or by calling the truesize function manually after displaying the image.

'ImtoolInitialMagnification'

Controls the initial magnification of the image displayed by imtool. Possible values:

{'adaptive'} — Display the entire image. If the image is too large to display on the screen at 100% magnification, display the image at the largest magnification that fits on the screen. This is the default.

Any numeric value — Specify the magnification as a percentage. A magnification of 100% means that there should be one screen pixel for every image pixel.

'fit' — Scale the image so that it fits into the window in its entirety.

You can override this preference by specifying the 'InitialMagnification' parameter when you call imtool.

'ImtoolStartWithOverview'

Controls whether the Overview tool opens automatically when you open an image using the Image Tool (imtool). Possible values:

true — Overview tool opens when you open an image.

{false} — Overview tool does not open when you open an image. This is the default behavior.

'VolumeViewerUseHardware'

Controls whether the volumeViewer app uses OpenGL shaders on the local graphics hardware to optimize volume rendering. Possible values:

{true} — Enable hardware optimization.

false — Disable hardware optimization.

Note

Note: Setting this preference to false has the side effect of removing certain functionality from the app and will drastically slow down rendering performance. This preference should only be set to false in technical support scenarios to resolve problems with graphics drivers.

'UseIPPL'

Controls whether some toolbox functions use hardware optimization or not. Possible values:

{true} — Enable hardware optimization

false — Disable hardware optimization

Note

Note: Setting this preference value clears all loaded MEX-files.

Data Types: char

Value you want to assign to an Image Processing Toolbox preference, specified as one of the values listed in the table in prefname.

Example: iptsetpref('ImshowBorder','tight')

Introduced before R2006a