Display bigimage
object
A bigimageshow
object displays data from a
bigimage
object. The bigimageshow
object progressively
loads image data based on image extents and screen resolution.
bigimageshow(
displays the big image
bigimg
)bigimg
using default display properties.
bigimageshow(___,
sets initial display properties using name-value
pairs. You can specify multiple name-value pairs. Enclose each argument or property name
in quotes.Name,Value
)
For example,
bigimageshow(bigimg,'GridVisible','on','GridLineStyle',':')
displays
a big image and overlays dotted grid lines.
b = bigimageshow(___)
returns
bigimageshow
object b
. Use b
to
modify the display settings after the big image is displayed.
bigimg
— Big imagebigimage
objectBig image, specified as a bigimage
object.
hax
— Parent axesParent axes of bigimageshow
object, specified as an axes
object.
Parent
— Parent of the bigimageshow
objectgca
(default) | axes objectParent axes of bigimageshow
object, specified as an axes object.
If you do not specify a parent, then bigimageshow
uses the handle to
the current figure, gca
. If a figure does not exist, then
bigimageshow
creates a new figure.
CData
— Big image databigimage
objectBig image data to display, specified as a bigimage
object.
CDataMapping
— Color data mapping method'direct'
(default) | 'scaled'
Color data mapping method, specified as 'direct'
or
'scaled'
. Use this property to control the mapping of color data
values in CData
into the colormap. CData
must be
a vector or a matrix defining indexed colors. This property has no effect if
CData
is a 3-D array defining RGB colors.
The methods have these effects:
'direct'
— Interpret the values as indices into the
current colormap. Values with a decimal portion are fixed to the nearest lower
integer.
If the values are of type double
or
single
, then values of 1
or less map
to the first color in the colormap. Values equal to or greater than the
length of the colormap map to the last color in the colormap.
If the values are of type uint8
,
uint16
, uint32
,
uint64
, int8
,
int16
, int32
, or
int64
, then values of 0
or less map
to the first color in the colormap. Values equal to or greater than the
length of the colormap map to the last color in the colormap (or up to the
range limits of the type).
If the values are of type logical
, then values of
0
map to the first color in the colormap and values of
1
map to the second color in the colormap.
'scaled'
— Scale the values to range between the
minimum and maximum color limits. The CLim
property of the axes
contains the color limits.
AlphaData
— Transparency data1
(default) | numeric scalar | numeric arrayTransparency data, specified in one of these forms:
Numeric scalar — Use a consistent transparency across the entire image.
Numeric array of the same size as CData
— Use a
different transparency value for each image element.
The AlphaDataMapping
property controls how MATLAB® interprets the alpha data transparency values.
Example: 0.5
Data Types: single
| double
| int8
| int16
| int32
| int64
| uint8
| uint16
| uint32
| uint64
| logical
AlphaDataMapping
— Interpretation of AlphaData
values 'none'
(default) | 'scaled'
| 'direct'
Interpretation of AlphaData
values, specified as one of these
values:
'none'
— Interpret the values as transparency values.
A value of 1 or greater is completely opaque, a value of 0 or less is completely
transparent, and a value between 0 and 1 is semitransparent.
'scaled'
— Map the values into the figure’s alphamap.
The minimum and maximum alpha limits of the axes determine the alpha data values
that map to the first and last elements in the alphamap, respectively. For example,
if the alpha limits are [3 5]
, then alpha data values less than
or equal to 3
map to the first element in the alphamap. Alpha
data values greater than or equal to 5
map to the last element in
the alphamap. The ALim
property of the axes contains
the alpha limits. The Alphamap
property of the
figure contains the alphamap.
'direct'
— Interpret the values as indices into the
figure’s alphamap. Values with a decimal portion are fixed to the nearest lower
integer:
If the values are of type double
or
single
, then values of 1 or less map to the first element
in the alphamap. Values equal to or greater than the length of the alphamap map
to the last element in the alphamap.
If the values are of type integer, then values of 0 or less map to the first
element in the alphamap. Values equal to or greater than the length of the
alphamap map to the last element in the alphamap (or up to the range limits of
the type). The integer types are uint8
,
uint16
, uint32
,
uint64
, int8
, int16
,
int32
, and int64
.
If the values are of type logical
, then values of
0
map to the first element in the alphamap and values of
1
map to the second element in the alphamap.
ResolutionLevel
— Resolution levelResolution level of image data to display, specified as a positive integer that is
less that or equal to the number of resolution levels of
bigimg
.
ResolutionLevelMode
— Selection mode for resolution level'auto'
(default) | 'manual'
Selection mode for resolution level, specified as one of these values:
'auto'
— Automatically select resolution level based
on parent axes and available screen size.
'manual'
— Manually select resolution level by
setting the ResolutionLevel
property.
GridVisible
— Grid lines are visible'off'
(default) | 'on'
Grid lines are visible, specified as 'off'
or
'on'
.
GridLevel
— Resolution level of grid lines'fine'
| 'coarse'
Resolution level of grid lines, specified as one of these values:
positive integer — Display the grid according to the specific
resolution level of bigimg
.
'fine'
— Display the grid at the finest (highest)
resolution level.
'coarse'
— Display the grid at the coarsest (lowest)
resolution level.
By default, GridLevel
has the same value as
ResolutionLevel
.
GridLevelMode
— Selection mode for grid resolution level'auto'
(default) | 'manual'
Selection mode for grid resolution level, specified as one of these values:
'auto'
— Select the grid resolution level to match
the image data resolution level ResolutionLevel
.
'manual'
— Manually specify the grid resolution
level by setting the GridLevel
property.
GridColor
— Grid line color'blue'
(default) | RGB triplet | hexadecimal color code | color name | short color nameGrid line color, specified as an RGB triplet, a hexadecimal color code, a color
name, or a short color name. To display the grid lines, set the
GridVisible
property to 'on'
.
For a custom color, specify an RGB triplet or a hexadecimal color code.
An RGB triplet is a three-element row vector whose elements
specify the intensities of the red, green, and blue
components of the color. The intensities must be in the
range [0,1]
; for example, [0.4
0.6 0.7]
.
A hexadecimal color code is a character vector or a string
scalar that starts with a hash symbol (#
)
followed by three or six hexadecimal digits, which can range
from 0
to F
. The
values are not case sensitive. Thus, the color codes
'#FF8800'
,
'#ff8800'
,
'#F80'
, and
'#f80'
are equivalent.
Alternatively, you can specify some common colors by name. This table lists the named color options, the equivalent RGB triplets, and hexadecimal color codes.
Color Name | Short Name | RGB Triplet | Hexadecimal Color Code | Appearance |
---|---|---|---|---|
'red' | 'r' | [1 0 0] | '#FF0000' | |
'green' | 'g' | [0 1 0] | '#00FF00' | |
'blue' | 'b' | [0 0 1] | '#0000FF' | |
'cyan' | 'c' | [0 1 1] | '#00FFFF' | |
'magenta' | 'm' | [1 0 1] | '#FF00FF' | |
'yellow' | 'y' | [1 1 0] | '#FFFF00' | |
'black' | 'k' | [0 0 0] | '#000000' | |
'white' | 'w' | [1 1 1] | '#FFFFFF' |
Here are the RGB triplets and hexadecimal color codes for the default colors MATLAB uses in many types of plots.
RGB Triplet | Hexadecimal Color Code | Appearance |
---|---|---|
[0 0.4470 0.7410] | '#0072BD' | |
[0.8500 0.3250 0.0980] | '#D95319' | |
[0.9290 0.6940 0.1250] | '#EDB120' | |
[0.4940 0.1840 0.5560] | '#7E2F8E' | |
[0.4660 0.6740 0.1880] | '#77AC30' | |
[0.3010 0.7450 0.9330] | '#4DBEEE' | |
[0.6350 0.0780 0.1840] | '#A2142F' |
Example: b.GridColor = [1 0 0]
Example: b.GridColor = 'r'
Example: b.GridColor = 'red'
Example: b.GridColor = '#FF0000'
GridAlpha
— Grid line transparency0.8
(default) | value in the range [0,1]
Grid line transparency, specified as a value in the range [0, 1]. A value of
1
means completely opaque and a value of 0
means
completely transparent. To display the grid lines, set the
GridVisible
property to 'on'
.
Example: b.GridAlpha = 0.5
GridLineWidth
— Grid line width1
(default) | positive valueGrid line width, specified as a positive value in points. To display the grid lines,
set the GridVisible
property to 'on'
.
GridLineStyle
— Grid line style'-'
(default) | '--'
| ':'
| '-.'
| 'none'
Grid line style, specified as one of the line styles in this table.
Line Style | Description | Resulting Line |
---|---|---|
'-' | Solid line |
|
'--' | Dashed line |
|
':' | Dotted line |
|
'-.' | Dash-dotted line |
|
'none' | No line | No line |
To display the grid lines, set the GridVisible
property to 'on'
.
Example: b.GridLineStyle = '--'
Interpolation
— Interpolation method'linear'
(default) | 'nearest'
Interpolation method used to resample pixels, specified as
'linear'
for bilinear interpolation, or
'nearest'
for nearest neighbor interpolation.
Visible
— bigimageshow
is visible'on'
(default) | 'off'
bigimageshow
is visible, specified as one of these values:
'on'
— Display the bigimageshow
object.
'off'
— Hide the object without deleting it. You
still can access the properties of an invisible object.
Create a bigimage
object from a .TIF file.
bigimg = bigimage('tumor_091R.tif');
Display the bigimage
at the finest resolution level by using the bigimageshow
function. To make the grid visible, specify the 'GridVisible'
name-value pair argument as 'on'
.
b = bigimageshow(bigimg,'ResolutionLevel',1,'GridVisible','on')
b = bigimageshow with properties: CData: [1x1 bigimage] CDataMapping: 'direct' Parent: [1x1 Axes] ResolutionLevel: 1 GridLevel: 1 Use GET to show all properties
You can modify the display settings by setting properties of the bigimageshow
object. Change the color of the grid to yellow by setting the 'GridColor'
property.
b.GridColor = 'y';
On Windows® systems with a software version of OpenGL®, the Interpolation property only
supports 'nearest'
.
[1] Bejnordi, Babak Ehteshami, Mitko Veta, Paul Johannes van Diest, Bram van Ginneken, Nico Karssemeijer, Geert Litjens, Jeroen A. W. M. van der Laak, et al. “Diagnostic Assessment of Deep Learning Algorithms for Detection of Lymph Node Metastases in Women With Breast Cancer.” JAMA 318, no. 22 (December 12, 2017): 2199–2210. https://doi.org/10.1001/jama.2017.14585.
You have a modified version of this example. Do you want to open this example with your edits?