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
| /F | By default, the image is flipped vertically to correspond to normal image orientation. if /F is present then the image is not flipped. | ||||||||||
| /G=g |
| ||||||||||
| /HIDE=h | Hides (h = 1) or shows (h = 0, default) the window. | ||||||||||
| /HOST=hcSpec | Embeds 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=k | Specifies window behavior when the user attempts to close it. | ||||||||||
| |||||||||||
| If you use /K=2 or /K=3, you can still kill the window using the KillWindow operation. | |||||||||||
| /LAYR=layer | Selects an image layer to use for the new image plot. | ||||||||||
| |||||||||||
| Omitting /LAYR is the same as /LAYR=0. | |||||||||||
| /N=name | Requests 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=pkMode | Use 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=s | s specifies one of several styles. If /S is not present, s =2 is the 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.