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, 2003, 2004, 2005, 2006, 2007, 2008
9 Gerber van der Graaf <gerber_graaf@users.sourceforge.net>
11 This file is part of gpiv.
13 Gpiv is free software; you can redistribute it and/or modify
14 it under the terms of the GNU General Public License as published by
15 the Free Software Foundation; either version 2, or (at your option)
18 This program is distributed in the hope that it will be useful,
19 but WITHOUT ANY WARRANTY; without even the implied warranty of
20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 GNU General Public License for more details.
23 You should have received a copy of the GNU General Public License
24 along with this program; if not, write to the Free Software Foundation,
25 Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
27 ----------------------------------------------------------------------*/
30 * widgets prototypes of display
31 * $Log: display_interface.h,v $
32 * Revision 1.13 2007-12-19 08:42:35 gerber
35 * Revision 1.12 2007-11-23 16:24:07 gerber
36 * release 0.5.0: Kafka
38 * Revision 1.11 2007-06-06 17:00:48 gerber
39 * Retreives images/data from URI using Gnome Virtual File System.
41 * Revision 1.10 2007-03-22 16:00:32 gerber
42 * Added image processing tabulator
44 * Revision 1.9 2007/02/05 15:17:09 gerber
45 * auto stretching, broadcast display settings to buffers from preferences
47 * Revision 1.8 2007-01-29 11:27:43 gerber
48 * added image formats png, gif, tif png, bmp, improved buffer display
50 * Revision 1.7 2006/01/31 14:28:12 gerber
53 * Revision 1.5 2004/06/14 21:19:23 gerber
54 * Image depth up to 16 bits.
55 * Improvement "single int" and "drag int" in Eval tab.
56 * Viewer's pop-up menu.
57 * Adaption for gpiv_matrix_* and gpiv_vector_*.
59 * See Changelog for further info.
61 * Revision 1.4 2003/09/01 11:17:14 gerber
62 * improved monitoring of interrogation process
64 * Revision 1.3 2003/07/31 11:43:26 gerber
65 * display images in gnome canvas (HOERAreset)
67 * Revision 1.2 2003/06/27 13:47:26 gerber
68 * display ruler, line/point evaluation
70 * Revision 1.1.1.1 2003/06/17 17:10:52 gerber
75 #ifndef DISPLAY_INTERFACE_H
76 #define DISPLAY_INTERFACE_H
78 #include "console_interface.h"
79 /* #include "gpiv_gui.h" */
82 typedef struct _Image Image
;
84 GpivImage
*image
; /* image structure */
87 * Image is displayed at gnome canvas
89 GdkPixbuf
*pixbuf1
; /* pixpbuf of first image frame */
90 GdkPixbuf
*pixbuf2
; /* pixbuf of first image frame */
91 guchar
*rgbbuf_img1
; /* graphical representation of first image frame */
92 guchar
*rgbbuf_img2
; /* graphical representation of first image frame */
93 guint rgb_img_width
; /* straddled image width */
94 gfloat img_mean
; /* average value of image intensity */
95 GnomeCanvasItem
*gci_img1
;
96 GnomeCanvasItem
*gci_img2
;
97 gboolean exist_img
; /* flag if image exists */
98 gboolean saved_img
; /* flag if image has been saved after modifying */
103 * Structure for displaying the Interrogation Region contours
105 typedef struct _Intreg Intreg
;
107 guint row_start_old
; /* Used to check if contours have to be updated */
108 guint col_start_old
; /* Used to check if contours have to be updated */
112 GnomeCanvasItem
*gci_intreg1
[MAX_DATA
][MAX_DATA
];
113 GnomeCanvasItem
*gci_intreg2
[MAX_DATA
][MAX_DATA
];
118 * Contains all PIV data, derived data and parameters
120 typedef struct _PivData PivData
;
123 GpivPivData
*piv_data
;
124 GpivPivData
*piv_data_scaled
;
128 gboolean averaged_piv
;
130 GnomeCanvasItem
*gci_vector
[MAX_DATA
][MAX_DATA
];
133 GpivCov
*cov
; /* Used for displaying in Interrogation tab of console */
136 gfloat
**intreg1
; /* Used for displaying in Interrogation tab of console */
137 gfloat
**intreg2
; /* Used for displaying in Interrogation tab of console */
139 GpivValidPar
*valid_par
;
140 gboolean exist_valid
;
142 gboolean exist_histo
;
143 gboolean saved_histo
;
145 GpivPostPar
*post_par
; /* Post processing parameters */
146 GpivScalarData
*vor_data
; /* Vorticity data, derived from PIV data */
147 GpivScalarData
*vor_data_scaled
; /* Time and spatial scaled vorticity data */
149 gboolean exist_vor_scaled
;
151 GnomeCanvasItem
*gci_scalar_vor
[MAX_DATA
][MAX_DATA
];
153 GpivScalarData
*sstrain_data
; /* Shear strain data, derived from PIV data */
154 GpivScalarData
*sstrain_data_scaled
; /* Time and spatial scaled shear strain data */
155 gboolean exist_sstrain
;
156 gboolean exist_sstrain_scaled
;
157 gboolean saved_sstrain
;
158 GnomeCanvasItem
*gci_scalar_sstrain
[MAX_DATA
][MAX_DATA
];
160 GpivScalarData
*nstrain_data
; /* Normal strain data, derived from PIV data */
161 GpivScalarData
*nstrain_data_scaled
; /* Time and spatial scaled normal strain data */
162 gboolean exist_nstrain
;
163 gboolean exist_nstrain_scaled
;
164 gboolean saved_nstrain
;
165 GnomeCanvasItem
*gci_scalar_nstrain
[MAX_DATA
][MAX_DATA
];
170 * The graphical interface of the display buffer
172 typedef struct _Display Display
;
175 guint id
; /* array number and identity of display.
176 When created set to row number in buffer clist,
177 but may differ after deleting displays has taken place */
178 GtkWidget
*mwin
; /* main window for display */
185 GtkWidget
*menuitem_view
;
186 GtkWidget
*menuitem_view_menu
;
187 GtkWidget
*view_menubar
;
188 GtkWidget
*view_rulers
;
189 GtkWidget
*stretch_auto
;
191 GtkWidget
*separator_zoom
;
194 GtkWidget
*zoom_menu
[8];
196 GtkWidget
*menuitem_background
;
197 GtkWidget
*menuitem_background_menu
;
198 GSList
*background_group
;
199 GtkWidget
*view_blue
;
200 GtkWidget
*view_black
;
201 GtkWidget
*view_image_a
;
202 GtkWidget
*view_image_b
;
204 GtkWidget
*menuitem_view_piv_data
;
205 GtkWidget
*menuitem_view_piv_data_menu
;
206 GtkWidget
*view_interrogation_areas
;
207 GtkWidget
*view_velocity_vectors
;
209 GtkWidget
*menuitem_view_scalar_data
;
210 GtkWidget
*menuitem_view_scalar_data_menu
;
211 GSList
*scalar_group
;
212 GtkWidget
*view_none
;
213 GtkWidget
*view_vorticity
;
214 GtkWidget
*view_shear_strain
;
215 GtkWidget
*view_normal_strain
;
217 GtkWidget
*menuitem_vector_scale
;
218 GtkWidget
*menuitem_vector_scale_menu
;
219 GSList
*vector_scale_group
;
220 gchar
*vector_scale_key
[9];
221 GtkWidget
*vector_scale_menu
[9];
223 GtkWidget
*menuitem_vector_color
;
224 GtkWidget
*menuitem_vector_color_menu
;
225 GSList
*vector_color_group
;
226 GtkWidget
*vector_color_peak_nr
;
227 GtkWidget
*vector_color_snr
;
228 GtkWidget
*vector_color_magngray
;
229 GtkWidget
*vector_color_magncolor
;
234 #ifdef DISPLAY_TOOLBAR
236 GtkIconSize toolbar_icon_size
;
237 GtkWidget
*toolitem_zoom_in
;
238 GtkWidget
*button_zoom_in
;
239 GtkWidget
*toolitem_zoom_out
;
240 GtkWidget
*button_zoom_out
;
241 GtkWidget
*toolitem_fit
;
242 GtkWidget
*button_fit
;
249 /* GtkWidget *button_origin; */
250 /* GtkWidget *arrow_origin; */
255 GtkWidget
*vscrollbar
;
256 GtkWidget
*hscrollbar
;
259 GtkWidget
*view_options
;
263 /* gboolean stretch_window_tmp; */
265 gfloat zoom_factor_old
;
269 gchar msg_display_default
[GPIV_MAX_CHARS
];
271 GtkWidget
*display_popupmenu
;
272 GnomeCanvasItem
*gci_bg
;
281 /* enum ShowBackground */ guint display_backgrnd
;
282 /* gboolean display_img1; */
283 /* gboolean display_img2; */
284 gboolean display_intregs
;
285 gboolean display_piv
;
286 /* enum ShowScalar */ guint display_scalar
;
287 /* gboolean display_vor; */
288 /* gboolean display_sstrain; */
289 /* gboolean display_nstrain; */
298 /* gdouble x_adj_value_init; */
303 /* gdouble y_adj_value_init; */
311 * creates display window
314 create_display (gchar
*fname
,
320 * creates display popup menu
323 create_display_popupmenu (Display
*disp
);
326 #endif /* DISPLAY_INTERFACE_H */