pro qView_SetInfo, state, event, boxset=boxset @compile_opt.pro ; On error, return to caller ;+ ; NAME: ; qView_SetInfo ; PURPOSE: ; Store information received from qImage widget by a QIMAGE_SEND event. ; CATEGORY: ; Widget qView ; CALLING SEQUENCE: ; qView_SetInfo, state, event, boxset=boxset ; INPUTS: ; state array[1]; type: structure ; qView state structure ; event array[1]; type: structure ; QIMAGE_SEND event ; OPTIONAL INPUT PARAMETERS: ; /boxset see PROCEDURE ; OUTPUTS: ; (stored in user value of state.wid_info ; CALLS: ; qImage_SendStructure ; PROCEDURE: ; The structure used to store the information consists of two groups. ; The first group describes the image cube as a whole: ; info.dim = the dimensions of the full image (as read from file) ; info.offset = the offset of the images in the cube ; info.subdim = the dimensions of the images in the cube ; If /boxset is set these fields are set using the event.dim and event.box ; information from the QIMAGE_SEND event: ; info.dim = event.dim ; info.offset = event.box[0:1] ; info.subdim = event.box[2:3]-event.box[0:1]+1 ; qView_SetBox will set /boxset after displaying a full image (read from file) ; in the qImage widget. A 'Send Info' message returned from qImage will ; have event.dim set to the full image dimensions, event.offset=[0,0] and ; event.box defines some area inside the image. This area will be read by the ; next 'Get Data' from the sequence of images and stored in the image cube. ; ; The other fields describe the content of the event.box area. These are always ; updated using the QIMAGE_SEND information: ; info.box, info.zval, info.zhilo, info.fixz, info.zlog, info.zoom ; These are described in qView_GetInfo. ; STATE INFO USED: ; widget_control, state.wid_info, get_uvalue=info, /no_copy ; STATE INFO MODIFIED: ; widget_control, state.wid_info, set_uvalue=info, /no_copy ; MODIFICATION HISTORY: ; FEB-2000, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- widget_control, state.wid_info, get_uvalue=info, /no_copy if keyword_set(boxset) then begin if n_elements(info) eq 0 then info = qImage_SendStructure() info.dim = event.dim info.offset = event.box[0:1] info.subdim = event.box[2:3]-event.box[0:1]+1 endif info.qimage_cw_state = event.qimage_cw_state info.box = event.box info.zval = event.zval info.zhilo = event.zhilo info.zback = event.zback info.fixz = event.fixz info.zlog = event.zlog info.zoom = event.zoom info.smei = event.smei info.center = event.center info.p_axis = event.p_axis info.p_box = event.p_box info.prorate= event.prorate widget_control, state.wid_info, set_uvalue=info, /no_copy return & end