CImageView:delete CImageView:AttachFromList

CImageView:Attach


The Attach method attaches the top most window (an Image window) to the script and creates a new CImageView object for it.

Syntax

NewImageView_Object = CImageView:Attach()

Remarks

Use Attach to run the script on the top-most Image window. To do this, bring the target window to the top of the stack and run the script using the [ ! ] button on the main toolbar.

Note: This method creates a new CImageView object so the new constructor should not be called.

Example

Suppose the script works with an image set displayed in the top-most window. The following script attaches the top-most window (an Image window) to the script and selects the 2nd image from the set:

 

V = CImageView:Attach()

-- attach the existing Image window

I = V:GetImage( 2 )

-- get a pointer to the 2nd image

Related Topics

CImageView, AttachFromList, GetViewPtr, CPlotView:Attach()