FUNCTION qImage_SendStructure, dim=dim, offset=offset, subdim=subdim, box=box ;+ ; NAME: ; qImage_SendStructure ; PURPOSE: ; Defines the structure used for QIMAGE_SEND events ; CATEGORY: ; Widgets qImage and qView ; CALLING SEQUENCE: ; S = qImage_SendStructure(dim=dim, offset=offset, box=box, subdim=subdim) ; OPTIONAL INPUT PARAMETERS: ; dim = dim see PROCEDURE ; offset = offset see PROCEDURE ; subdim = subdim see PROCEDURE ; box = box see PROCEDURE ; OUTPUTS: ; S array[1]; type: structure ; event structure ; INCLUDE: @compile_opt.pro ; On error, return to caller ; PROCEDURE: ; Information from keywords is used to initialize some of the fields. ; The event structure has the following fields (in adddition to the three standard ; fields ID, TOP and HANDLER which are set to 0L). ; ; dim array[2]; type: integer ; dimensions of the full images (as stored in image file) ; offset array[2]; type: integer ; pixel coordinates of the lower left corner of the image cube ; currently loaded in memory ; subdim array[2]; type: integer ; dimensions of the images in the current image cube ; box array[2,2]; type: integer ; square area of pixels in the image, expressed as pixel coordinates ; in the full images (i.e. including 'offset'); ; box[0:1,*] is the lower left corner; box[0:1,*] the upper right ; corner. Box is fully contained in the images in the current image cube. ; zval array[4]; type: float ; min, max, average and standard deviation for the 'box' area ; zhilo array[2]; type: float ; min and max used to limit the range of pixel values if 'fixz' is set. ; fixz scalar; type: byte ; if set then 'zhilo' is used to limit the range of pixel values ; displayed in images and cross sections. ; zlog scalar; type: byte ; if set then pixel values are displayed on a logarithmic scale ; zoom scalar; type: integer ; zoom factor used in displaying a 'wall' view or and animation. ; ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS) ; FEB-2001, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; Added optical axis p_axis to event structure. ;- S = {QIMAGE_SEND, ID:0L, TOP:0L, HANDLER:0L, $ qimage_cw_state: {qimage_cw_state}, $ DIM : intarr(2), $ OFFSET : [0,0], $ SUBDIM : [0,0], $ BOX : [[0,0],[-1,-1]], $ SMEI : 0B, $ CENTER : [0.,0.], $ P_AXIS : [0.,0.], $ P_BOX : [[0.,0.],[-1.,-1.]], $ PRORATE : intarr(3), $ ZVAL : fltarr(4), $ ZHILO : fltarr(2), $ ZBACK : 0.0, $ FIXZ : 0B, $ ZLOG : 0B, $ ZOOM : 1 } IF n_elements(dim ) NE 0 THEN S.dim = dim IF n_elements(offset) NE 0 THEN S.offset = offset IF n_elements(box ) NE 0 THEN S.box = box IF n_elements(subdim) NE 0 THEN S.subdim = subdim RETURN, S & END