Skip to main content

NewImage

NewImage [/F/G=g /HIDE=h /HOST=hcSpec /K=k /LAYR=layer /N=name /S=s ] matrix

The NewImage operation creates a new image graph much like "Display;AppendImage matrix ", except that the graph is prepared using a style more appropriate for images. Rather than using preferences, NewImage provides several discrete styles to choose from.

Parameters

matrix is usually an MxN matrix containing image data. See the AppendImage command for details.

Flags

/FBy default, the image is flipped vertically to correspond to normal image orientation. if /F is present then the image is not flipped.
/G=g
g =0:Default, which is same as no /G flag.
g =1:Suppresses the autodetection of three plane images as direct (rgb) color. Flag also suppresses detection of explicit mode.
/HIDE=hHides (h = 1) or shows (h = 0, default) the window.
/HOST=hcSpecEmbeds the new image plot in the host window or subwindow specified by hcSpec.
When identifying a subwindow with hcSpec, see Subwindow Syntax for details on forming the window hierarchy.
/K=kSpecifies window behavior when the user attempts to close it.
k =0:Normal with dialog (default).
k =1:Kills with no dialog.
k =2:Disables killing.
k =3:Hides the window.
k =4:Kills with no dialog and is not saved with the experiment.
If you use /K=2 or /K=3, you can still kill the window using the KillWindow operation.
/LAYR=layerSelects an image layer to use for the new image plot.
layer = 0:The image will be put into Layer 0 (below axes and traces), and Layer 1 wlll be empty.
layer = 1:The image will be put into Layer 1 (above axes and traces), and Layer 0 will be empty.
Omitting /LAYR is the same as /LAYR=0.
/N=nameRequests that the created graph have this name, if it is not in use. If it is in use, then name0, name1, etc are tried until an unused window name is found. In a function or macro, S_name is set to the chosen graph name.
/PACK=pkModeUse this flag to specify the binary packaging of the image. By default, pkMode=packSTD, where 2D numeric waves represent grayscale images and 3D waves represent color images. See Direct Color Packing Modes for more information.
/S=ss specifies one of several styles. If /S is not present, s =2 is the default.
s =0:Fills entire window with image. No axes. However, this can result in the lower right corner not being visible due to the target icon.
s =1:Like s =0 but insets image to avoid corner icon.
s =2:Provides minimalist axes (default).

Details

The graph is sized to make the image pixels a multiple of the screen pixels with the graph size constrained to be not too small and not too large.

If matrix appears to fit Igor's standard monochrome category, then explicit mode is set (See ModifyImage explicit). To be considered monochrome the wave must be unsigned byte and contain only values of 0, 64 or 255.

Once the graph is created it is a normal graph and has no special properties other than the settings it was created with. Specifically, it will not autosize itself if the dimensions of matrix are changed. NewImage is just a shortcut for creating a graph window with a style appropriate for images.

This operation is limited in scope by design. If you need to specify the position, size or title, then use the operations Display and AppendImage.

If the styles provided are not what you desire, touch up an image graph to meet your needs and then use Capture Graph Prefs from the Graphs menu. Then use "Display; AppendImage" rather than NewImage.

See Also

Display, AppendImage, ModifyImage

Direct Color Packing Modes