1 /* -*- Mode: C; indent-tabs-mode: nil; c-basic-offset: 4 c-style: "K&R" -*- */
3 /*----------------------------------------------------------------------
5 gpiv - Graphic program for Particle Image Velocimetry, based on gtk/gnome
8 Copyright (C) 2002 Gerber van der Graaf
10 This file is part of gpiv.
12 Gpiv is free software; you can redistribute it and/or modify
13 it under the terms of the GNU General Public License as published by
14 the Free Software Foundation; either version 2, or (at your option)
17 This program is distributed in the hope that it will be useful,
18 but WITHOUT ANY WARRANTY; without even the implied warranty of
19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 GNU General Public License for more details.
22 You should have received a copy of the GNU General Public License
23 along with this program; if not, write to the Free Software Foundation,
24 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26 ----------------------------------------------------------------------*/
29 * widgets prototypes of display
30 * $Log: display_interface.h,v $
31 * Revision 1.13 2007-12-19 08:42:35 gerber
34 * Revision 1.12 2007-11-23 16:24:07 gerber
35 * release 0.5.0: Kafka
37 * Revision 1.11 2007-06-06 17:00:48 gerber
38 * Retreives images/data from URI using Gnome Virtual File System.
40 * Revision 1.10 2007-03-22 16:00:32 gerber
41 * Added image processing tabulator
43 * Revision 1.9 2007/02/05 15:17:09 gerber
44 * auto stretching, broadcast display settings to buffers from preferences
46 * Revision 1.8 2007-01-29 11:27:43 gerber
47 * added image formats png, gif, tif png, bmp, improved buffer display
49 * Revision 1.7 2006/01/31 14:28:12 gerber
52 * Revision 1.5 2004/06/14 21:19:23 gerber
53 * Image depth up to 16 bits.
54 * Improvement "single int" and "drag int" in Eval tab.
55 * Viewer's pop-up menu.
56 * Adaption for gpiv_matrix_* and gpiv_vector_*.
58 * See Changelog for further info.
60 * Revision 1.4 2003/09/01 11:17:14 gerber
61 * improved monitoring of interrogation process
63 * Revision 1.3 2003/07/31 11:43:26 gerber
64 * display images in gnome canvas (HOERAreset)
66 * Revision 1.2 2003/06/27 13:47:26 gerber
67 * display ruler, line/point evaluation
69 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
74 #ifndef DISPLAY_INTERFACE_H
75 #define DISPLAY_INTERFACE_H
77 #include "console_interface.h"
78 /* #include "gpiv_gui.h" */
81 typedef struct _Image Image
;
83 GpivImage
*image
; /* image structure */
86 * Image is displayed at gnome canvas
88 GdkPixbuf
*pixbuf1
; /* pixpbuf of first image frame */
89 GdkPixbuf
*pixbuf2
; /* pixbuf of first image frame */
90 guchar
*rgbbuf_img1
; /* graphical representation of first image frame */
91 guchar
*rgbbuf_img2
; /* graphical representation of first image frame */
92 guint rgb_img_width
; /* straddled image width */
93 gfloat img_mean
; /* average value of image intensity */
94 GnomeCanvasItem
*gci_img1
;
95 GnomeCanvasItem
*gci_img2
;
96 gboolean exist_img
; /* flag if image exists */
97 gboolean saved_img
; /* flag if image has been saved after modifying */
102 * Structure for displaying the Interrogation Region contours
104 typedef struct _Intreg Intreg
;
106 guint row_start_old
; /* Used to check if contours have to be updated */
107 guint col_start_old
; /* Used to check if contours have to be updated */
111 GnomeCanvasItem
*gci_intreg1
[MAX_DATA
][MAX_DATA
];
112 GnomeCanvasItem
*gci_intreg2
[MAX_DATA
][MAX_DATA
];
117 * Contains all PIV data, derived data and parameters
119 typedef struct _PivData PivData
;
122 GpivPivData
*piv_data
;
123 GpivPivData
*piv_data_scaled
;
127 gboolean averaged_piv
;
129 GnomeCanvasItem
*gci_vector
[MAX_DATA
][MAX_DATA
];
132 GpivCov
*cov
; /* Used for displaying in Interrogation tab of console */
135 gfloat
**intreg1
; /* Used for displaying in Interrogation tab of console */
136 gfloat
**intreg2
; /* Used for displaying in Interrogation tab of console */
138 GpivValidPar
*valid_par
;
139 gboolean exist_valid
;
141 gboolean exist_histo
;
142 gboolean saved_histo
;
144 GpivPostPar
*post_par
; /* Post processing parameters */
145 GpivScalarData
*vor_data
; /* Vorticity data, derived from PIV data */
146 GpivScalarData
*vor_data_scaled
; /* Time and spatial scaled vorticity data */
148 gboolean exist_vor_scaled
;
150 GnomeCanvasItem
*gci_scalar_vor
[MAX_DATA
][MAX_DATA
];
152 GpivScalarData
*sstrain_data
; /* Shear strain data, derived from PIV data */
153 GpivScalarData
*sstrain_data_scaled
; /* Time and spatial scaled shear strain data */
154 gboolean exist_sstrain
;
155 gboolean exist_sstrain_scaled
;
156 gboolean saved_sstrain
;
157 GnomeCanvasItem
*gci_scalar_sstrain
[MAX_DATA
][MAX_DATA
];
159 GpivScalarData
*nstrain_data
; /* Normal strain data, derived from PIV data */
160 GpivScalarData
*nstrain_data_scaled
; /* Time and spatial scaled normal strain data */
161 gboolean exist_nstrain
;
162 gboolean exist_nstrain_scaled
;
163 gboolean saved_nstrain
;
164 GnomeCanvasItem
*gci_scalar_nstrain
[MAX_DATA
][MAX_DATA
];
169 * The graphical interface of the display buffer
171 typedef struct _Display Display
;
174 guint id
; /* array number and identity of display.
175 When created set to row number in buffer clist,
176 but may differ after deleting displays has taken place */
177 GtkWidget
*mwin
; /* main window for display */
184 GtkWidget
*menuitem_view
;
185 GtkWidget
*menuitem_view_menu
;
186 GtkWidget
*view_menubar
;
187 GtkWidget
*view_rulers
;
188 GtkWidget
*stretch_auto
;
190 GtkWidget
*separator_zoom
;
193 GtkWidget
*zoom_menu
[8];
195 GtkWidget
*menuitem_background
;
196 GtkWidget
*menuitem_background_menu
;
197 GSList
*background_group
;
198 GtkWidget
*view_blue
;
199 GtkWidget
*view_black
;
200 GtkWidget
*view_image_a
;
201 GtkWidget
*view_image_b
;
203 GtkWidget
*menuitem_view_piv_data
;
204 GtkWidget
*menuitem_view_piv_data_menu
;
205 GtkWidget
*view_interrogation_areas
;
206 GtkWidget
*view_velocity_vectors
;
208 GtkWidget
*menuitem_view_scalar_data
;
209 GtkWidget
*menuitem_view_scalar_data_menu
;
210 GSList
*scalar_group
;
211 GtkWidget
*view_none
;
212 GtkWidget
*view_vorticity
;
213 GtkWidget
*view_shear_strain
;
214 GtkWidget
*view_normal_strain
;
216 GtkWidget
*menuitem_vector_scale
;
217 GtkWidget
*menuitem_vector_scale_menu
;
218 GSList
*vector_scale_group
;
219 gchar
*vector_scale_key
[9];
220 GtkWidget
*vector_scale_menu
[9];
222 GtkWidget
*menuitem_vector_color
;
223 GtkWidget
*menuitem_vector_color_menu
;
224 GSList
*vector_color_group
;
225 GtkWidget
*vector_color_peak_nr
;
226 GtkWidget
*vector_color_snr
;
227 GtkWidget
*vector_color_magngray
;
228 GtkWidget
*vector_color_magncolor
;
233 #ifdef DISPLAY_TOOLBAR
235 GtkIconSize toolbar_icon_size
;
236 GtkWidget
*toolitem_zoom_in
;
237 GtkWidget
*button_zoom_in
;
238 GtkWidget
*toolitem_zoom_out
;
239 GtkWidget
*button_zoom_out
;
240 GtkWidget
*toolitem_fit
;
241 GtkWidget
*button_fit
;
248 /* GtkWidget *button_origin; */
249 /* GtkWidget *arrow_origin; */
254 GtkWidget
*vscrollbar
;
255 GtkWidget
*hscrollbar
;
258 GtkWidget
*view_options
;
262 /* gboolean stretch_window_tmp; */
264 gfloat zoom_factor_old
;
268 gchar msg_display_default
[GPIV_MAX_CHARS
];
270 GtkWidget
*display_popupmenu
;
271 GnomeCanvasItem
*gci_bg
;
280 /* enum ShowBackground */ guint display_backgrnd
;
281 /* gboolean display_img1; */
282 /* gboolean display_img2; */
283 gboolean display_intregs
;
284 gboolean display_piv
;
285 /* enum ShowScalar */ guint display_scalar
;
286 /* gboolean display_vor; */
287 /* gboolean display_sstrain; */
288 /* gboolean display_nstrain; */
297 /* gdouble x_adj_value_init; */
302 /* gdouble y_adj_value_init; */
310 * creates display window
313 create_display (gchar
*fname
,
319 * creates display popup menu
322 create_display_popupmenu (Display
*disp
);
325 #endif /* DISPLAY_INTERFACE_H */