CImageView Class


The CImageView class wraps a Mira image view window that displays images. The Image View window uses an image set to work with a group of images. This class encloses a pointer to the view window and provides methods for displaying and adjusting images and for working with the image cursor.

Usage

Construction

Object = CImageView:new()

Destruction

Object:delete()

Properties (Variables)

ptr

A pointer to the Mira image view window. This pointer is nil if no image view window has been attached.

Note: It is not wise to work directly with ptr. Instead, refer to ptr using the GetViewPtr method.

Methods

Construction

new

Creates a new CImageView object. This is the global script counterpart of the GetParent method.

delete

Deletes the CImageView object.

Attach

Attaches the top-most window (an Image window) to the script and creates a new CImageView object for it.

NOTE: When using this method, make the target image window the top-most window and run the script using the Script Manager or the [!] button on the main toolbar, not the [!] button in the script editor window.

AttachFromList

Attaches an Image window selected from a list and creates a new CImageView object for it.

GetViewPtr

Returns a pointer to the Mira image view window attached to the CImageView object.

AttachHandle

Attaches the handle of an image window to this CImageView object.

GetHandle

Retrieves the handle of the GUI image window attached to the current object.

Image Display Methods

Append

Appends the CImage object to the image view window's image set, making it the last image in the image set. Creates a new image view window if necessary.

Display

Creates a new image view window and displays a CImage object in it.

Insert

Inserts the CImage object into the image set at a specified index and displays the image. Creates a new window if necessary.

Image Set Operations

Count

Returns the number of images in the image set used by the image view window.

First

Indexes the image set to the first image.

GetGraphSet

Returns the graph one/all flag for the image set of the image view window.

GetImage

Creates and returns a CImage object for the view image at a specified index.

GetImagePtr

Returns a pointer to the image at a specified index of the image set. May also return the current image.

GetImageSet

Returns a copy of the CImageView's image set as a new CImageSet.

GetIndex

Returns the image set index of the CImage object in the image set of the image view window.

GetMeasureSet

Returns the measure one/all flag for the image set of the image view window.

GetProcessSet

Returns the process one/all flag for the image set of the image view window.

GraphSet

Sets the graph one/all flag for the image set in the image view window.

Last

Indexes the image set to the last image.

MeasureSet

Sets the measure one/all flag for the image set in the image view window.

Next

Indexes the image set to the next image.

Prev

Indexes the image set to the previous image.

ProcessSet

Sets the process one/all flag for the image set in the image view window.

Remove

Removes the CImage from the image set and deletes it from memory.

SetIndex

Indexes the image set to a specified position.

SwapNext

Swaps the CImage object with the next image in the image set of the view window.

SwapPrev

Swaps the CImage object with the previous image in the image set of the view window.

Image Cursor

GetCursorPos

Returns the cursor center position in pixel coordinates.

GetCursorRect

Returns a CRect object that describes the image cursor.

SetCursorExtent

Sets the image cursor rectangle using (left, top, right, bottom) in pixel coordinates.

SetCursorHeight

Sets the height of the image cursor, in pixels.

SetCursorPos

Centers the image cursor to pixel coordinate x,y.

SetCursorPosWcs

Centers the image cursor at world coordinate x,y.

SetCursorRect

Sets the image cursor using a CRect object in pixel coordinates.

SetCursorStyle

Sets the image cursor style.

SetCursorWidth

Sets the width of the image cursor, in pixels.

Window Operations

CenterAt

Centers the image at pixel coordinate x,y.

CenterAtWcs

Centers the image at world coordinate x,y.

GetFlipFITS

Gets the current state of the FITS flip flag.

GetPlotAvgMode

Returns the column/row averaging flag for making cursor plots.

GetZoom

Returns the image zoom value.

SetFlipFITS

Sets the option for flipping FITS image display.

SetPlotAvgMode

Sets the cursor plot averaging mode to mean, median, or sum.

SetZoom

Sets the image zoom value.

Update

update the display after changing an image.

UpdateAll

update the display of all images in the window.

Related Topics

CImage class

CRect class

CLabels class

CPlotView class

Script Classes