Initial revision
[gpiv.git] / src / pivpost.c
blob0ae5301ce7cb8829114c234ce705260a2b6e0f8b
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
6 libraries.
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)
15 any later version.
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 * (callback) functions for Piv post processing window/tabulator
30 * $Log: pivpost.c,v $
31 * Revision 1.1 2003-06-17 17:10:52 gerber
32 * Initial revision
37 #include "gpiv_gtk.h"
38 #include "utils.h"
39 #include "pivpost.h"
40 #include "display.h"
44 * Piv post-processing callbacks
46 void
47 on_spinbutton_post_scale(GtkSpinButton * widget, GtkWidget * entry)
48 /* (GtkWidget *widget, gpointer data) */
50 enum VariableType {
51 COL_POS = 1,
52 ROW_POS = 2,
53 S_SCALE = 3,
54 T_SCALE = 4
55 } var_type;
57 var_type = atoi(gtk_object_get_data(GTK_OBJECT(widget), "var_type"));
59 if (var_type == COL_POS) {
60 image_par.z_off_x = gtk_spin_button_get_value_as_float(widget);
61 image_par.z_off_logic = 1;
62 if (display_act != NULL) {
63 display_act->img.image_par.z_off_x = image_par.z_off_x;
64 display_act->img.image_par.z_off_logic = 1;
67 } else if (var_type == ROW_POS) {
68 image_par.z_off_y = gtk_spin_button_get_value_as_float(widget);
69 image_par.z_off_logic = 1;
70 if (display_act != NULL) {
71 display_act->img.image_par.z_off_y = image_par.z_off_y;
72 display_act->img.image_par.z_off_logic = 1;
75 } else if (var_type == S_SCALE) {
76 image_par.s_scale = gtk_spin_button_get_value_as_float(widget) * 1e-3;
77 image_par.s_scale_logic = 1;
78 if (display_act != NULL) {
79 display_act->img.image_par.s_scale = image_par.s_scale;
80 display_act->img.image_par.s_scale_logic = 1;
83 } else if (var_type == T_SCALE) {
84 image_par.t_scale = gtk_spin_button_get_value_as_float(widget) * 1e-3;
85 image_par.t_scale_logic = 1;
86 if (display_act != NULL) {
87 display_act->img.image_par.t_scale = image_par.t_scale;
88 display_act->img.image_par.t_scale_logic = 1;
91 } else {
92 g_warning("on_spinbutton_post_scale: should not arrive here");
98 void
99 on_button_post_scale_enter(GtkWidget *widget,
100 gpointer data)
102 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
103 gchar *msg = _("Calculates scaled locations and velocities");
104 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
107 void
108 on_button_post_scale(GtkWidget *widget,
109 gpointer data)
111 /* PivPost * post = gtk_object_get_data(GTK_OBJECT(widget), "post"); */
112 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
113 gint row, ibuf;
115 if (nbufs > 0) {
116 for (row = gpiv->first_selected_row; row <= gpiv->last_selected_row;
117 row++) {
118 display_act = gtk_clist_get_row_data(GTK_CLIST(gpiv->clist_buf),
119 row);
120 ibuf = display_act->count;
121 if (display[ibuf] != NULL
122 && display_act->mwin != NULL
123 && GTK_WIDGET_VISIBLE(GTK_WIDGET(display_act->mwin)) ) {
124 gdk_window_show(GTK_WIDGET(display_act->mwin)->window);
125 gdk_window_raise(GTK_WIDGET(display_act->mwin)->window);
127 g_warning("on_button_post_scale:: 1");
128 exec_scale(gpiv->pivpost);
129 g_warning("on_button_post_scale:: 2");
135 void
136 on_button_post_savg_enter(GtkWidget *widget,
137 gpointer data)
139 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
140 gchar *msg = _("Calculates spatial average displacements");
141 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
145 void
146 on_button_post_savg(GtkWidget *widget,
147 gpointer data)
149 PivPost * post = gtk_object_get_data(GTK_OBJECT(widget), "post");
150 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
151 gint row, ibuf;
153 if (nbufs > 0) {
154 for (row = gpiv->first_selected_row; row <= gpiv->last_selected_row;
155 row++) {
156 display_act = gtk_clist_get_row_data(GTK_CLIST(gpiv->clist_buf),
157 row);
158 ibuf = display_act->count;
159 if (display[ibuf] != NULL
160 && display_act->mwin != NULL
161 && GTK_WIDGET_VISIBLE(GTK_WIDGET(display_act->mwin)) ) {
162 gdk_window_show(GTK_WIDGET(display_act->mwin)->window);
163 gdk_window_raise(GTK_WIDGET(display_act->mwin)->window);
165 exec_savg(post);
171 void
172 on_button_post_subavg_enter(GtkWidget *widget,
173 gpointer data)
175 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
176 gchar *msg = _("Substracts mean displacements from PIV data");
177 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
181 void
182 on_button_post_subavg(GtkWidget *widget,
183 gpointer data)
185 PivPost * post = gtk_object_get_data(GTK_OBJECT(widget), "post");
186 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
187 gint row, ibuf;
189 if (nbufs > 0) {
190 for (row = gpiv->first_selected_row; row <= gpiv->last_selected_row;
191 row++) {
192 display_act = gtk_clist_get_row_data(GTK_CLIST(gpiv->clist_buf),
193 row);
194 ibuf = display_act->count;
195 if (display[ibuf] != NULL
196 && display_act->mwin != NULL
197 && GTK_WIDGET_VISIBLE(GTK_WIDGET(display_act->mwin)) ) {
198 gdk_window_show(GTK_WIDGET(display_act->mwin)->window);
199 gdk_window_raise(GTK_WIDGET(display_act->mwin)->window);
201 exec_subavg(post);
207 void
208 on_radiobutton_post_vorstra_output_enter(GtkWidget *widget,
209 gpointer data)
211 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
212 gchar *msg = _("Selects the differential quantity");
213 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
216 void
217 on_radiobutton_post_vorstra_output(GtkWidget *widget,
218 gpointer data)
220 PivPost * post = gtk_object_get_data(GTK_OBJECT(widget), "post");
221 piv_post_par.operator_vorstra = atoi(gtk_object_get_data
222 (GTK_OBJECT(widget),
223 "operator"));
224 fprintf(stderr, "operator_vorstra = %d\n", piv_post_par.operator_vorstra);
226 if (piv_post_par.operator_vorstra == VORTICITY) {
227 gtk_widget_set_sensitive(post->radiobutton_vorstra_diffscheme_4,
228 TRUE);
229 } else {
230 if (piv_post_par.diff_type == CIRCULATION) {
231 piv_post_par.diff_type = CENTRAL;
232 gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON
233 (post->radiobutton_vorstra_diffscheme_1),
234 TRUE);
236 gtk_widget_set_sensitive(post->radiobutton_vorstra_diffscheme_4,
237 FALSE);
242 void
243 on_radiobutton_post_vorstra_diffscheme_enter(GtkWidget *widget,
244 gpointer data)
246 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
247 gchar *msg = _("Selects the type of differential scheme");
248 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
252 void
253 on_radiobutton_post_vorstra_diffscheme(GtkWidget *widget,
254 gpointer data)
256 piv_post_par.diff_type = atoi(gtk_object_get_data(GTK_OBJECT(widget),
257 "diff_type"));
258 /* fprintf(stderr, "diff_type = %d\n", piv_post_par.diff_type); */
263 void
264 on_button_post_vorstra_enter(GtkWidget *widget,
265 gpointer data)
267 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
268 gchar *msg = _("Calculates differential quantity");
269 gnome_appbar_set_status(GNOME_APPBAR(gpiv->appbar), msg);
273 void
274 on_button_post_vorstra(GtkWidget *widget,
275 gpointer data)
277 GpivConsole *gpiv = gtk_object_get_data(GTK_OBJECT(widget), "gpiv");
278 gint row, ibuf;
280 if (nbufs > 0) {
281 for (row = gpiv->first_selected_row; row <= gpiv->last_selected_row;
282 row++) {
283 display_act = gtk_clist_get_row_data(GTK_CLIST(gpiv->clist_buf),
284 row);
285 ibuf = display_act->count;
286 if (display[ibuf] != NULL
287 && display_act->mwin != NULL
288 && GTK_WIDGET_VISIBLE(GTK_WIDGET(display_act->mwin)) ) {
289 gdk_window_show(GTK_WIDGET(display_act->mwin)->window);
290 gdk_window_raise(GTK_WIDGET(display_act->mwin)->window);
292 exec_vorstra();
299 * Other post-processing functions
302 void
303 exec_scale(PivPost * pivpost)
306 g_warning("exec_scale:: 1");
307 if (display_act->gpd.scaled_piv)
308 gpiv_free_pivdata(&display_act->gpd.piv_data_scaled);
310 display_act->gpd.piv_data_scaled.nx = display_act->gpd.piv_data.nx;
311 display_act->gpd.piv_data_scaled.ny = display_act->gpd.piv_data.ny;
312 gpiv_alloc_pivdata(&display_act->gpd.piv_data_scaled);
313 g_warning("exec_scale:: 2");
315 if(display_act->gpd.exist_piv && !cancel_process) {
316 if ((display_act->gpd.scaled_piv =
317 gpiv_post_scale (display_act->gpd.piv_data,
318 &display_act->gpd.piv_data_scaled,
319 display_act->img.image_par)) != 1) {
320 gtk_error("exec_scale:: Failure calling gpiv_post_scale");
323 free_post_bufmems(display_act);
324 } else {
325 gtk_warning(_("no PIV data"));
332 void exec_savg(PivPost * pivpost)
334 gint ndata = 0;
335 gfloat mean_dx = 0.0, sdev_dx = 0.0, min_dx = 0.0, max_dx = 0.0;
336 gfloat mean_dy = 0.0, sdev_dy = 0.0, min_dy = 0.0, max_dy = 0.0;
338 gfloat mean_dx_scaled = 0.0, sdev_dx_scaled = 0.0, min_dx_scaled = 0.0,
339 max_dx_scaled = 0.0;
340 gfloat mean_dy_scaled = 0.0, sdev_dy_scaled = 0.0, min_dy_scaled = 0.0,
341 max_dy_scaled = 0.0;
342 PivData dummy_data;
344 if (display_act->gpd.exist_piv && !cancel_process) {
345 exec_process = TRUE;
346 piv_post_par.substract = 0;
347 gpiv_post_savg(display_act->gpd.piv_data,
348 &dummy_data,
349 piv_post_par,
350 &ndata,
351 &mean_dx,
352 &mean_dy,
353 &sdev_dx,
354 &sdev_dy,
355 &min_dx,
356 &min_dy,
357 &max_dx,
358 &max_dy);
361 /* display_act->gpd. */
362 g_warning("::mean_dx = %f sdev_dx = %f min_dx = %f max_dx = %f",
363 mean_dx, sdev_dx, min_dx, max_dx);
364 g_warning("::mean_dy = %f sdev_dy = %f min_dy = %f max_dy = %f\n",
365 mean_dy, sdev_dy, min_dy, max_dy);
368 gtk_spin_button_set_value (GTK_SPIN_BUTTON
369 (pivpost->spinbutton_suavg),
370 (gfloat) mean_dx);
371 gtk_spin_button_set_value (GTK_SPIN_BUTTON
372 (pivpost->spinbutton_svavg),
373 (gfloat) mean_dy);
376 * Repete same process for scaled piv_data
378 if (display_act->gpd.scaled_piv) {
379 gpiv_post_savg(display_act->gpd.piv_data_scaled,
380 &dummy_data,
381 piv_post_par,
382 &ndata,
383 &mean_dx_scaled,
384 &mean_dy_scaled,
385 &sdev_dx_scaled,
386 &sdev_dy_scaled,
387 &min_dx_scaled,
388 &min_dy_scaled,
389 &max_dx_scaled,
390 &max_dy_scaled);
392 g_warning(":: mean_dx = %f sdev_dx = %f min_dx = %f max_dx = %f",
393 mean_dx_scaled, sdev_dx_scaled, min_dx_scaled, max_dx_scaled);
394 g_warning("::mean_dy = %f sdev_dy = %f min_dy = %f max_dy = %f\n",
395 mean_dy_scaled, sdev_dy_scaled, min_dy_scaled, max_dy_scaled);
398 gtk_spin_button_set_value (GTK_SPIN_BUTTON
399 (pivpost->spinbutton_suavg),
400 (gfloat) mean_dx_scaled);
401 gtk_spin_button_set_value (GTK_SPIN_BUTTON
402 (pivpost->spinbutton_svavg),
403 (gfloat) mean_dy_scaled);
406 * Copy parameters in Buffer structure for saving and, eventual,
407 * later use
410 display_act->gpd.piv_post_par.z_off_dx = piv_post_par.z_off_dx;
411 display_act->gpd.piv_post_par.z_off_dy = piv_post_par.z_off_dy;
413 display_act->gpd.piv_post_par.z_off_d_logic = 1;
414 exec_process = FALSE;
416 } else {
417 gtk_warning(_("no PIV data"));
420 /* g_warning("exec_savg:: entering"); */
421 /* gtk_warning(_("not connected, yet")); */
427 void exec_subavg(PivPost * pivpost)
429 gint ndata = 0, i, j;
430 gfloat mean_dx = 0.0, sdev_dx = 0.0, min_dx = 0.0, max_dx = 0.0;
431 gfloat mean_dy = 0.0, sdev_dy = 0.0, min_dy = 0.0, max_dy = 0.0;
432 gfloat mean_dx_scaled = 0.0, sdev_dx_scaled = 0.0, min_dx_scaled = 0.0,
433 max_dx_scaled = 0.0;
434 gfloat mean_dy_scaled = 0.0, sdev_dy_scaled = 0.0, min_dy_scaled = 0.0,
435 max_dy_scaled = 0.0;
436 PivData out_data, out_data_scaled;
438 out_data.point_x = NULL;
439 out_data.point_y = NULL;
440 out_data.dx = NULL;
441 out_data.dy = NULL;
442 out_data.snr = NULL;
443 out_data.peak_no = NULL;
445 out_data_scaled.point_x = NULL;
446 out_data_scaled.point_y = NULL;
447 out_data_scaled.dx = NULL;
448 out_data_scaled.dy = NULL;
449 out_data_scaled.snr = NULL;
450 out_data_scaled.peak_no = NULL;
452 if (display_act->gpd.exist_piv && !cancel_process) {
453 exec_process = TRUE;
454 piv_post_par.substract = 1;
455 out_data.nx = display_act->gpd.piv_data.nx;
456 out_data.ny = display_act->gpd.piv_data.ny;
457 gpiv_alloc_pivdata(&out_data);
458 gpiv_post_savg(display_act->gpd.piv_data,
459 &out_data,
460 piv_post_par,
461 &ndata,
462 &mean_dx,
463 &mean_dy,
464 &sdev_dx,
465 &sdev_dy,
466 &min_dx,
467 &min_dy,
468 &max_dx,
469 &max_dy);
471 gtk_spin_button_set_value (GTK_SPIN_BUTTON(pivpost->spinbutton_suavg),
472 (gfloat) mean_dx);
473 gtk_spin_button_set_value (GTK_SPIN_BUTTON(pivpost->spinbutton_svavg),
474 (gfloat) mean_dy);
476 for (i = 0; i < display_act->gpd.piv_data.ny; i++) {
477 for (j = 0; j < display_act->gpd.piv_data.nx; j++) {
478 display_act->gpd.piv_data.dx[i][j] = out_data.dx[i][j];
479 display_act->gpd.piv_data.dy[i][j] = out_data.dy[i][j];
483 gpiv_free_pivdata(&out_data);
484 update_all_vectors(&display_act->gpd);
487 * Repete same process for scaled piv_data
489 if (display_act->gpd.scaled_piv) {
490 out_data.nx = display_act->gpd.piv_data_scaled.nx;
491 out_data.ny = display_act->gpd.piv_data_scaled.ny;
492 gpiv_alloc_pivdata(&out_data);
493 gpiv_post_savg(display_act->gpd.piv_data_scaled,
494 &out_data,
495 piv_post_par,
496 &ndata,
497 &mean_dx_scaled,
498 &mean_dy_scaled,
499 &sdev_dx_scaled,
500 &sdev_dy_scaled,
501 &min_dx_scaled,
502 &min_dy_scaled,
503 &max_dx_scaled,
504 &max_dy_scaled);
506 gtk_spin_button_set_value (GTK_SPIN_BUTTON(pivpost->spinbutton_suavg),
507 (gfloat) mean_dx_scaled);
508 gtk_spin_button_set_value (GTK_SPIN_BUTTON(pivpost->spinbutton_svavg),
509 (gfloat) mean_dy_scaled);
511 for (i = 0; i < display_act->gpd.piv_data.ny; i++) {
512 for (j = 0; j < display_act->gpd.piv_data.nx; j++) {
513 display_act->gpd.piv_data_scaled.dx[i][j] = out_data.dx[i][j];
514 display_act->gpd.piv_data_scaled.dy[i][j] = out_data.dy[i][j];
518 gpiv_free_pivdata(&out_data);
523 * Copy parameters in Buffer structure for saving and, eventual,
524 * later use
527 display_act->gpd.piv_post_par.z_off_dx = piv_post_par.z_off_dx;
528 display_act->gpd.piv_post_par.z_off_dy = piv_post_par.z_off_dy;
530 display_act->gpd.piv_post_par.z_off_d_logic = 1;
531 exec_process = FALSE;
533 } else {
534 gtk_warning(_("no PIV data"));
537 /* g_warning("exec_savg:: entering"); */
538 /* gtk_warning(_("not connected, yet")); */
543 void exec_vorstra(void)
545 /* ScalarData out_data; */
547 if (display_act->gpd.exist_piv && !cancel_process) {
548 exec_process = TRUE;
552 * Vorticity calculation
554 if (piv_post_par.operator_vorstra == VORTICITY) {
555 if (display_act->gpd.exist_vor) {
556 destroy_all_scalars(&display_act->gpd.vor_data,
557 VORTICITY
558 /* display_act->gpd.gci_scalar_vor */
560 gpiv_free_scdata(&display_act->gpd.vor_data);
561 display_act->gpd.exist_vor = FALSE;
562 /* display_act->gpd.d_vor = FALSE; */
565 display_act->gpd.vor_data.nx = display_act->gpd.piv_data.nx;
566 display_act->gpd.vor_data.ny = display_act->gpd.piv_data.ny;
567 gpiv_alloc_scdata(&display_act->gpd.vor_data);
568 gpiv_post_vorstra(display_act->gpd.piv_data, &display_act->gpd.vor_data,
569 piv_post_par);
570 display_all_scalars(&display_act->gpd.vor_data,
571 VORTICITY
572 /* display_act->gpd.gci_scalar_vor */
574 display_act->gpd.exist_vor = TRUE;
575 display_act->gpd.saved_vor = FALSE;
576 /* display_act->gpd.d_vor = TRUE; */
579 * Repete vorticity calculation process for scaled piv_data
581 if (display_act->gpd.scaled_piv) {
582 display_act->gpd.vor_data_scaled.nx =
583 display_act->gpd.piv_data.nx;
584 display_act->gpd.vor_data_scaled.ny =
585 display_act->gpd.piv_data.ny;
586 gpiv_alloc_scdata(&display_act->gpd.vor_data_scaled);
587 gpiv_post_vorstra(display_act->gpd.piv_data,
588 &display_act->gpd.vor_data_scaled,
589 piv_post_par);
590 display_act->gpd.exist_vor_scaled = TRUE;
595 * Shear strain calculation
597 } else if (piv_post_par.operator_vorstra == S_STRAIN) {
598 if (display_act->gpd.exist_sstrain) {
599 destroy_all_scalars(&display_act->gpd.sstrain_data, S_STRAIN);
600 gpiv_free_scdata(&display_act->gpd.sstrain_data);
601 display_act->gpd.exist_sstrain = FALSE;
602 /* display_act->gpd.d_sstrain = FALSE; */
605 display_act->gpd.sstrain_data.nx = display_act->gpd.piv_data.nx;
606 display_act->gpd.sstrain_data.ny = display_act->gpd.piv_data.ny;
607 gpiv_alloc_scdata(&display_act->gpd.sstrain_data);
608 gpiv_post_vorstra(display_act->gpd.piv_data, &display_act->gpd.sstrain_data,
609 piv_post_par);
610 display_all_scalars(&display_act->gpd.sstrain_data, S_STRAIN);
611 display_act->gpd.exist_sstrain = TRUE;
612 display_act->gpd.saved_sstrain = FALSE;
613 /* display_act->gpd.d_sstrain = TRUE; */
616 * Repete shear strain calculation process for scaled piv_data
618 if (display_act->gpd.scaled_piv) {
619 display_act->gpd.sstrain_data_scaled.nx =
620 display_act->gpd.piv_data.nx;
621 display_act->gpd.sstrain_data_scaled.ny =
622 display_act->gpd.piv_data.ny;
623 gpiv_alloc_scdata(&display_act->gpd.sstrain_data_scaled);
624 gpiv_post_vorstra(display_act->gpd.piv_data,
625 &display_act->gpd.sstrain_data_scaled,
626 piv_post_par);
627 display_act->gpd.exist_sstrain_scaled = TRUE;
631 * Normal strain calculation
633 } else if (piv_post_par.operator_vorstra == N_STRAIN) {
634 if (display_act->gpd.exist_nstrain) {
635 destroy_all_scalars(&display_act->gpd.nstrain_data, N_STRAIN);
636 gpiv_free_scdata(&display_act->gpd.nstrain_data);
637 display_act->gpd.exist_nstrain = FALSE;
638 /* display_act->gpd.d_nstrain = FALSE; */
641 display_act->gpd.nstrain_data.nx = display_act->gpd.piv_data.nx;
642 display_act->gpd.nstrain_data.ny = display_act->gpd.piv_data.ny;
643 gpiv_alloc_scdata(&display_act->gpd.nstrain_data);
644 gpiv_post_vorstra(display_act->gpd.piv_data, &display_act->gpd.nstrain_data,
645 piv_post_par);
646 display_all_scalars(&display_act->gpd.nstrain_data, N_STRAIN);
647 display_act->gpd.exist_nstrain = TRUE;
648 display_act->gpd.saved_nstrain = FALSE;
649 /* display_act->gpd.d_nstrain = TRUE; */
652 * Repete normal strain calculation process for scaled piv_data
654 if (display_act->gpd.scaled_piv) {
655 display_act->gpd.nstrain_data_scaled.nx =
656 display_act->gpd.piv_data.nx;
657 display_act->gpd.nstrain_data_scaled.ny =
658 display_act->gpd.piv_data.ny;
659 gpiv_alloc_scdata(&display_act->gpd.nstrain_data_scaled);
660 gpiv_post_vorstra(display_act->gpd.piv_data,
661 &display_act->gpd.nstrain_data_scaled,
662 piv_post_par);
663 display_act->gpd.exist_nstrain_scaled = TRUE;
668 } else {
669 gtk_warning(_("non valid vorstra operation"));
671 exec_process = FALSE;
673 } else {
674 gtk_warning(_("no PIV data"));
677 /* --------------------------------------------------------------------
678 Copy parameters in Buffer structure for saving and, eventual,
679 later use */
681 if (display_act->gpd.exist_vor || display_act->gpd.exist_sstrain ||
682 display_act->gpd.exist_nstrain) {
684 display_act->gpd.piv_post_par.diff_type = piv_post_par.diff_type;
685 display_act->gpd.piv_post_par.operator_vorstra =
686 piv_post_par.operator_vorstra;
688 display_act->gpd.piv_post_par.diff_type_logic = 1;
689 display_act->gpd.piv_post_par.operator_vorstra_logic = 1;
691 gpiv_post_print_parameters(display_act->gpd.piv_post_par);
695 /* gpiv_write_scdata( &display_act->gpd.vor_data, c_line, nc_lines, */
696 /* scale, RCSID); */