1 /***************************************************************************** 2 Major portions of this software are copyrighted by the Medical College 3 of Wisconsin, 1994-2000, and are released under the Gnu General Public 4 License, Version 2. See the file README.Copyright for details. 5 ******************************************************************************/ 6 7 /*---------------------------------------------------------------------------*/ 8 /* This is the header file for imseq.c, the AFNI image viewer. 9 Please see that file for more commentary. 10 *//*-------------------------------------------------------------------------*/ 11 12 #ifndef _MCW_IMSEQ_HEADER_ 13 #define _MCW_IMSEQ_HEADER_ 14 15 #include <X11/X.h> 16 #include <X11/Intrinsic.h> 17 #include <X11/Shell.h> 18 #include <X11/cursorfont.h> 19 20 #include <Xm/Xm.h> 21 #include <Xm/Form.h> 22 #include <Xm/Scale.h> 23 #include <Xm/PushB.h> 24 #include <Xm/DrawingA.h> 25 #include <Xm/Protocols.h> 26 #include <Xm/MwmUtil.h> 27 #include <Xm/DialogS.h> 28 #include <Xm/Label.h> 29 #include <Xm/AtomMgr.h> 30 31 #include <stdio.h> 32 #include <string.h> 33 #include <math.h> 34 #include <ctype.h> 35 #include <signal.h> 36 37 #include "mrilib.h" 38 #include "vecmat.h" 39 40 #include "display.h" 41 #include "bbox.h" 42 #include "xutil.h" 43 #include "machdep.h" 44 45 #include "coxplot.h" /* 30 Dec 1998 */ 46 47 #ifdef __cplusplus 48 extern "C" { 49 #endif 50 51 /*** typedefs ***/ 52 53 #ifndef HAVE_GET_PTR_TYPEDEF 54 # define HAVE_GET_PTR_TYPEDEF 55 typedef XtPointer (*get_ptr)() ; /* function type that returns a pointer */ 56 #endif 57 58 /* This struct is returned from AFNI to indicate the general 59 'status' or setup of the images to be displayed. 60 Other stuff is stuffed into here, such as the lists of 61 image transformation function that AFNI provides for fun. */ 62 63 typedef struct { 64 int num_total , num_series ; /* # of images, # in "series" */ 65 66 void (* send_CB)() ; /* callback, if non_NULL */ 67 68 MCW_function_list *transforms0D ; 69 MCW_function_list *transforms2D ; 70 MCW_function_list *slice_proj ; /* 31 Jan 2002 */ 71 72 XtPointer parent , aux ; 73 } MCW_imseq_status ; 74 75 /* macro to see if a viewer is doing slice projection 76 -- which is controlled from the 'Disp' popup menu. */ 77 78 #define ISQ_DOING_SLICE_PROJ(ss) \ 79 ( (ss)->slice_proj_range > 0 && \ 80 (ss)->slice_proj_func != NULL ) 81 82 /* macros for image physical size -- 83 not pixels but pixels time physical width per pixels (mm) */ 84 85 #define IM_WIDTH(im) \ 86 ( ((im)->dx > 0) ? ((im)->nx * (im)->dx) : ((im)->nx) ) 87 88 #define IM_HEIGHT(im) \ 89 ( ((im)->dy > 0) ? ((im)->ny * (im)->dy) : ((im)->ny) ) 90 91 /* define dimensions used in the window */ 92 93 #define FORM_FRAC_BASE 1000 /* for positioning things in the Form */ 94 #define IMAGE_FRAC 0.8 /* default image fraction as size of Form */ 95 #define DFRAC 0.01 /* parameters for changing image fraction */ 96 #define FRAC_MAX 0.95 97 #define FRAC_MIN 0.25 98 99 #define COLOR_BAR_WIDTH 16 /* size of the 'bar' next to the image */ 100 #define COLOR_BAR_SPACE 4 /* space between bar and image */ 101 102 /* button stuff */ 103 104 #define NBUTTON_BOT 4 /* # buttons at bottom */ 105 #define NBUTTON_RIG 3 /* # buttons at right */ 106 107 /* Motif things for how to attach buttons (Widgets) 108 to each other in the bottom array and in the right array, 109 so that they remain together as the viewer window is resized */ 110 111 #define LEADING_BOT XmNleftAttachment 112 #define LEADING_WIDGET_BOT XmNleftWidget 113 #define TRAILING_BOT XmNrightAttachment 114 #define EDGING_BOT XmNbottomAttachment 115 #define SPACING_BOT XmNleftOffset 116 117 #define LEADING_RIG XmNtopAttachment 118 #define LEADING_WIDGET_RIG XmNtopWidget 119 #define TRAILING_RIG XmNbottomAttachment 120 #define EDGING_RIG XmNrightAttachment 121 #define SPACING_RIG XmNtopOffset 122 123 #define NARROW 5 124 125 /* image destruction stuff */ 126 127 /* for deleting XImages, which are a struct created in xim.c 128 from an AFNI internal MRI_IMAGE 129 -- XImage is something that X11 knows how to put to the display */ 130 131 #define KILL_2XIM(one,two) \ 132 do { if( (two) != (one) ) MCW_kill_XImage(two) ; \ 133 MCW_kill_XImage(one) ; (one) = (two) = NULL ; } while(0) 134 135 #define KILL_2ndXIM(one,two) \ 136 do { if( (two) != (one) ) MCW_kill_XImage(two) ; \ 137 (two) = NULL ; } while(0) 138 139 /* kill a MRI_IMAGE, and set its pointer to NULL */ 140 141 #define KILL_1MRI(one) \ 142 do{ if( (one) != NULL ){ mri_free(one) ; (one) = NULL ; }} while(0) 143 144 /* an image viewer can be VALID, which means created successfully, 145 and it can also be REALiZed, meaning it is actually open for business */ 146 147 #define ISQ_VALID(seq) ((seq)!=NULL && ((seq)->valid)>0) 148 #define ISQ_REALZ(seq) ((seq)!=NULL && ((seq)->valid)>1) 149 150 /*--------------------- button box stuff for Disp menu ---------------------*/ 151 152 typedef struct { 153 int nbut ; 154 char ** lbut ; 155 int type , frame ; 156 157 XtPointer parent , aux ; 158 } ISQ_boxdef ; 159 160 #define NBOX_DISP 9 /* # button boxes in Disp dialog */ 161 162 #define NBOX_MAX NBOX_DISP /* max # boxes to allow for in imseq */ 163 164 #define ISQ_ROT_0 1 /* values returned by various button boxes */ 165 #define ISQ_ROT_90 2 /* in the Disp dialog (will be transferred */ 166 #define ISQ_ROT_180 4 /* to values in the options data) */ 167 #define ISQ_ROT_270 8 168 169 #define ISQ_TO_MRI_ROT(x) (x) /* convert ISQ_ROT codes to MRI_ROT codes */ 170 171 #define ISQ_SCL_AUTO 1 172 #define ISQ_SCL_GRP 2 173 #define ISQ_SCL_USER 65536 174 175 #define ISQ_RNG_MINTOMAX 1 176 #define ISQ_RNG_02TO98 2 177 #define ISQ_RNG_CLIPPED 4 178 179 #define ISQ_ASPECT 1 180 181 #define ISQ_SAV_NSIZE 1 182 #define ISQ_SAV_PNM 2 183 #define ISQ_SAV_ONE 4 /* 26 Jul 2001: no longer used */ 184 185 #define ISQ_IMPROC_NONE 0 /* values returned by various button */ 186 #define ISQ_IMPROC_FLAT 1 187 #define ISQ_IMPROC_SHARP 2 /* boxes in the Disp dialog improc box */ 188 #define ISQ_IMPROC_SOBEL 4 /* (powers of 2 of button indexes) */ 189 #define ISQ_IMPROC_VG 8 190 191 #define ISQ_CX_MAG 1 /* values returned by buttons in */ 192 #define ISQ_CX_PHASE 2 /* the Disp dialog "complex" box */ 193 #define ISQ_CX_REAL 4 194 #define ISQ_CX_IMAG 8 195 196 /* This struct stores the options settable from the Disp menu */ 197 198 typedef struct { 199 int mirror , rot , no_overlay , 200 scale_group , scale_range , free_aspect , 201 save_nsize , save_pnm , save_one , improc_code , cx_code ; 202 203 XtPointer parent , aux ; 204 205 int save_filter ; /* 27 Jun 2001 */ 206 int save_agif ; /* 27 Jul 2001 */ 207 int save_mpeg ; /* 02 Jul 2001 */ 208 } ISQ_options ; 209 210 #undef AGIF_MODE 211 #undef MPEG_MODE 212 #undef JPEG_MODE 213 #undef PNG_MODE 214 #undef RAW_MODE 215 #undef RAWMONT_MODE 216 217 #define AGIF_MODE 1 /* 06 Dec 2006 - for ISQ_save_anim() */ 218 #define MPEG_MODE 2 219 #define JPEG_MODE 3 220 #define PNG_MODE 4 221 #define RAW_MODE 5 222 #define RAWMONT_MODE 6 223 224 /* check to see if two Disp options structs have 225 the same entries -- if so, we can sometimes avoid a redisplay */ 226 227 #define ISQ_OPT_EQUAL(opta,optb) \ 228 ( ((opta).mirror == (optb).mirror ) && \ 229 ((opta).rot == (optb).rot ) && \ 230 ((opta).no_overlay == (optb).no_overlay ) && \ 231 ((opta).scale_group == (optb).scale_group) && \ 232 ((opta).scale_range == (optb).scale_range) && \ 233 ((opta).free_aspect == (optb).free_aspect) && \ 234 ((opta).improc_code == (optb).improc_code) && \ 235 ((opta).cx_code == (optb).cx_code ) ) 236 237 /* Set the default Disp options [09 Oct 1998] */ 238 239 #define ISQ_DEFAULT_OPT(opt) do{ (opt).mirror = FALSE ; \ 240 (opt).rot = ISQ_ROT_0 ; \ 241 (opt).no_overlay = False ; \ 242 (opt).scale_group = ISQ_SCL_AUTO ; \ 243 (opt).scale_range = ISQ_RNG_02TO98 ; \ 244 (opt).free_aspect = False ; \ 245 (opt).save_nsize = False ; \ 246 (opt).save_pnm = False ; \ 247 (opt).save_one = True ; \ 248 (opt).improc_code = ISQ_IMPROC_NONE ; \ 249 (opt).cx_code = ISQ_CX_MAG ; \ 250 (opt).parent = NULL ; \ 251 (opt).aux = NULL ; \ 252 (opt).save_filter = -1 ; \ 253 (opt).save_agif = 0 ; \ 254 (opt).save_mpeg = 0 ; \ 255 } while(0) 256 257 /*------------- statistics for image display scaling -------------*/ 258 259 #define NHISTOG 500 260 261 /* This struct stores some statistics for a single image (slice), 262 which can be used to determine the value-to-grayscale mapping. */ 263 typedef struct { 264 RwcBoolean one_done , glob_done ; 265 float min,max , per02,per98 , 266 scl_mm,lev_mm , scl_per,lev_per ; 267 float entropy ; 268 269 XtPointer parent , aux ; 270 } ISQ_indiv_statistics ; 271 272 /* This struct is for a now disabled ability 273 in the image viewer -- to scan thru all the 274 images and set global statistics from them. */ 275 276 typedef struct { 277 RwcBoolean mm_done , per_done ; 278 float min,max , per02,per98 , 279 scl_mm,lev_mm , scl_per,lev_per ; 280 int hist[NHISTOG] ; 281 XtWorkProcId worker ; 282 283 XtPointer parent , aux ; 284 } ISQ_glob_statistics ; 285 286 /* macro to compute 'level' and 'scale' factors for image display */ 287 288 #define ISQ_SCLEV(mn,mx,dp,sc,lv) \ 289 ( (lv) = (mn) , (sc) = (((mx)>(mn)) ? (((dp)-0.49)/((mx)-(mn))) : 1.0) ) 290 291 /*--- "callback" data stuff: info about events in image window ---*/ 292 293 typedef struct { 294 int reason ; /* isqCR_??? defined below */ 295 XEvent * event ; /* may be NULL */ 296 int xim,yim ; /* original image coords, */ 297 /* OR new image size */ 298 299 int key ; /* keyvalue */ 300 int nim ; /* new image number */ 301 ISQ_options opt ; /* new options */ 302 XtPointer userdata ; /* misc stuff */ 303 304 XtPointer parent , aux ; 305 } ISQ_cbs ; 306 307 /* Here is where the Callback Reasons (CRs) used to tell 308 AFNI what kind of information is being sent and/or requested 309 when the get_image() function is invoked in imseq.c somewhere. */ 310 311 #define isqCR_buttonpress 1 /* button press in image */ 312 #define isqCR_keypress 2 /* key press in image */ 313 #define isqCR_geometry 3 /* the display geometry altered */ 314 #define isqCR_newimage 4 /* moved to a new image */ 315 #define isqCR_newmontage 5 /* a new image montage layout */ 316 #define isqCR_buttonmove 6 /* button moved while pressed [17 Mar 2010] */ 317 #define isqCR_destroy 99 /* the MCW_imseq was destroyed */ 318 319 #define isqCR_getimage 401 320 #define isqCR_getoverlay 402 321 #define isqCR_getstatus 403 322 #define isqCR_getqimage 404 323 #define isqCR_getopacim 405 /* 26 Sep 2007 */ 324 #define isqCR_getulayim 406 /* 24 Oct 2008 */ 325 #define isqCR_getolayim 407 /* 24 Oct 2008 */ 326 327 #define isqCR_getxynim 411 /* 30 Dec 1998 */ 328 329 #define isqCR_getmemplot 421 /* 21 Feb 2001 */ 330 #define isqCR_getlabel 422 /* 19 Sep 2001 */ 331 332 #define isqCR_dxplus 301 /* arrowpad reasons */ 333 #define isqCR_dxminus 302 334 #define isqCR_dyplus 303 335 #define isqCR_dyminus 304 336 #define isqCR_appress 309 337 338 #define isqCR_button2_points 501 /* Feb 1998 */ 339 #define isqCR_button2_key 502 /* 20 Feb 2003 */ 340 341 #define isqCR_force_redisplay 601 /* 22 Aug 1998 */ 342 #define isqCR_setindex 602 /* 26 Apr 2007 */ 343 #define isqCR_deltival 603 /* 23 Feb 2011 */ 344 #define isqCR_raiseupthedead 604 /* 17 Jun 2011 */ 345 #define isqCR_globalrange 605 /* 03 Feb 2013 */ 346 #define isqCR_resetglobalrange 606 347 #define isqCR_opacitychange 607 /* 06 Jun 2019 */ 348 #define isqCR_zoomchange 608 /* 10 Dec 2019 */ 349 350 /* what to do if the colormap (or grayscale map) changes: 351 If we are actually part of the AFNI GUI, let AFNI handle the 352 necessary redisplay (for all image viewers). 353 Otherwise, just force a redisplay internally. */ 354 355 #define COLORMAP_CHANGE(sq) \ 356 do{ if( ISQ_REALZ((sq)) && (sq)->dc->visual_class == TrueColor ){ \ 357 if( (sq)->status->send_CB != NULL ){ \ 358 ISQ_cbs cbs ; \ 359 cbs.reason = isqCR_force_redisplay ; \ 360 AFNI_CALL_VOID_3ARG( (sq)->status->send_CB , \ 361 MCW_imseq * , (sq) , \ 362 XtPointer , (sq)->getaux , \ 363 ISQ_cbs * , &cbs ) ; \ 364 } else { \ 365 KILL_2XIM( (sq)->given_xbar , (sq)->sized_xbar ) ; \ 366 ISQ_redisplay( (sq) , -1 , isqDR_display ) ; \ 367 } \ 368 } } while(0) 369 370 /* Ditto for opacity change */ 371 372 #define OPACITY_CHANGE(sq,oval) \ 373 do{ if( ISQ_REALZ((sq)) && (sq)->dc->visual_class == TrueColor ){ \ 374 if( (sq)->status->send_CB != NULL ){ \ 375 ISQ_cbs cbs ; \ 376 cbs.reason = isqCR_opacitychange ; \ 377 cbs.nim = (oval) ; \ 378 AFNI_CALL_VOID_3ARG( (sq)->status->send_CB , \ 379 MCW_imseq * , (sq) , \ 380 XtPointer , (sq)->getaux , \ 381 ISQ_cbs * , &cbs ) ; \ 382 } else { \ 383 KILL_2XIM( (sq)->given_xbar , (sq)->sized_xbar ) ; \ 384 ISQ_redisplay( (sq) , -1 , isqDR_display ) ; \ 385 } \ 386 } } while(0) 387 388 /* and for Zoom change */ 389 390 #define ZOOM_CHANGE(sq) \ 391 do{ if( ISQ_REALZ((sq)) ){ \ 392 if( (sq)->status->send_CB != NULL ){ \ 393 ISQ_cbs cbs ; \ 394 cbs.reason = isqCR_zoomchange ; \ 395 cbs.nim = 0 ; \ 396 AFNI_CALL_VOID_3ARG( (sq)->status->send_CB , \ 397 MCW_imseq * , (sq) , \ 398 XtPointer , (sq)->getaux , \ 399 ISQ_cbs * , &cbs ) ; \ 400 } \ 401 } } while(0) 402 403 /*------------------------------*/ 404 /* Montage-ization */ 405 406 #ifndef MONT_NMAX 407 #define MONT_NMAX 199 /* up from 13 [18 Nov 2017] */ 408 #endif 409 410 #ifndef MONT_SMAX 411 #define MONT_SMAX 199 412 #endif 413 414 #ifndef MONT_GMAX 415 #define MONT_GMAX 13 416 #endif 417 418 #define MONT_SPATIAL 0 /* mont_mode codes */ 419 #define MONT_ULAY 1 420 #define MONT_OLAY 2 421 #define MONT_UOLAY 3 422 #define MONT_UOT2 4 423 424 #define MONT_LAST_TYPE 4 /* last of the list above */ 425 426 static char *mont_types[MONT_LAST_TYPE+1] = { "Space (xyz)" , 427 "Time: ULay" , 428 "Time: OLay" , 429 "Time: UOLay" , 430 "Time: U1OT2" } ; 431 432 extern void ISQ_montage_CB( Widget , XtPointer , XtPointer ) ; 433 extern void ISQ_montage_action_CB( Widget , XtPointer , XtPointer ) ; 434 extern void ISQ_set_anim_dup( int ) ; /* 09 Feb 2009 */ 435 436 /*------------------------------------------------------------*/ 437 /*------------- the central data type: MCW_imseq -------------*/ 438 /*------------------------------------------------------------*/ 439 440 #define ISQ_NHELP 2047 441 #define ISQ_NWIDGET 128 442 443 struct MCW_imseq ; /* incomplete definition, completed below: */ 444 445 typedef struct MCW_imseq { 446 447 int valid ; /* flag if this structure is valid: 448 0 => no good at all 449 1 => valid but unrealized 450 2 => valid and realized */ 451 452 int ignore_redraws ; /* flag to ignore external redraws */ 453 454 int horig , vorig ; /* horz and vert dimens, sans aspect */ 455 456 int hbase , vbase ; /* horz and vert "standard" image dimensions */ 457 int hactual , vactual ; /* dimensions, allowing for rotations */ 458 int old_hact, old_vact; /* recent values */ 459 float scl , lev ; /* for scaling intensities */ 460 int bot , top ; /* for clipping intensities */ 461 462 RwcBoolean done_first ; /* for the done button */ 463 464 MCW_DC *dc ; /* graphics data (copy of a pointer) */ 465 466 MCW_imseq_status *status ; /* status of image sequence */ 467 468 float last_width_mm , last_height_mm ; /* physical sizes (in mm, say)*/ 469 470 ISQ_options opt, old_opt ; /* image display options */ 471 472 Widget wtop, wform, wimage, wbar, wscale , winfo , 473 wbut_bot[NBUTTON_BOT] , wbut_rig[NBUTTON_RIG] ; /* windows */ 474 Widget rinfo_sep , rinfo ; /* 11 Mar 2020 */ 475 476 Widget wbar_menu , wbar_rng_but , wbar_zer_but , wbar_flat_but , 477 wbar_sharp_but , wbar_vgize_but ; 478 MCW_bbox *wbar_amask_bbox ; /* 14 Jun 2010 */ 479 MCW_bbox *wbar_invrt_bbox ; /* 14 Sep 2020 */ 480 float rng_bot,rng_top,rng_ztop , flat_bot,flat_top , sharp_fac , vgize_fac ; 481 int zer_color , rng_extern ; 482 483 MCW_arrowval *arrow[NARROW] ; /* arrow controls */ 484 485 MCW_arrowpad *arrowpad ; /* arrowpad in lower right corner */ 486 487 int marg_bot , marg_rig , wf_wide , wf_high ; 488 489 int num_bbox ; 490 MCW_bbox *bbox[NBOX_MAX] ; /* button boxes */ 491 Widget dialog ; 492 int dialog_starter ; 493 ISQ_options save_opt ; 494 495 get_ptr getim ; /* pointer to image retrieval procedure */ 496 XtPointer getaux ; /* pointer to image retrieval auxiliary data */ 497 498 int im_nr ; /* index of latest and greatest */ 499 char im_label[64] ; 500 char im_helptext[ISQ_NHELP+1] ; 501 502 int onoff_num , onoff_state ; 503 Widget onoff_widgets[ISQ_NWIDGET] ; /* widgets on & off */ 504 505 int last_image_type ; 506 507 int mont_nx , mont_ny , mont_skip , mont_gap , mont_gapcolor ; 508 int mont_nx_old, mont_ny_old, mont_skip_old, mont_gap_old, mont_gapcolor_old; 509 int mont_periodic , mont_mode , mont_mode_old ; 510 MCW_arrowval *mont_across_av , *mont_down_av , *mont_skip_av , 511 *mont_gap_av , *mont_gapcolor_av ; 512 MCW_arrowval *mont_type_av ; /* 25 Feb 2011 */ 513 514 float image_frac ; /* 25 Oct 1996 */ 515 516 MCW_arrowval *transform0D_av ; /* 30 Oct 1996 */ 517 generic_func *transform0D_func ; 518 int transform0D_index ; 519 520 MCW_arrowval *transform2D_av ; 521 generic_func *transform2D_func ; 522 int transform2D_index ; 523 524 MCW_arrowval *slice_proj_av ; /* 31 Jan 2002 */ 525 float_func *slice_proj_func ; 526 int slice_proj_index ; 527 MCW_arrowval *slice_proj_range_av ; 528 int slice_proj_range ; 529 530 MCW_arrowval *rowgraph_av ; /* 30 Dec 1998 */ 531 int rowgraph_num ; 532 MEM_topshell_data *rowgraph_mtd ; 533 534 MCW_arrowval *surfgraph_av ; /* 21 Jan 1999 */ 535 int surfgraph_num ; 536 MEM_topshell_data *surfgraph_mtd ; 537 MCW_arrowpad *surfgraph_arrowpad ; 538 float surfgraph_theta , surfgraph_phi ; 539 540 int never_drawn ; 541 542 int button2_enabled , button2_active , button2_drawmode ; 543 Pixel button2_pixel ; 544 int wimage_width , wimage_height ; 545 546 /*--- data below here should be freed before deletion ---*/ 547 548 MRI_IMAGE *imim , *ovim ; /* latest and greatest (already processed) */ 549 MRI_IMAGE *last_automask ; 550 551 int need_orim , set_orim ; /* flag to compute orim */ 552 MRI_IMAGE *orim ; /* input underlay image (for rowgraphs) */ 553 554 XImage *given_xim , *sized_xim ; /* for actual displaying */ 555 XImage *given_xbar , *sized_xbar ; 556 557 ISQ_indiv_statistics *imstat ; 558 ISQ_glob_statistics *glstat ; 559 560 /*--- temporary, I hope [Hah!] ---*/ 561 562 int saver_from , saver_to , saver_blowup ; 563 char *saver_prefix ; 564 565 /*--- the obligatory ---*/ 566 567 XtPointer parent ; 568 569 /* extra text for winfo [07 Aug 1999] */ 570 571 char winfo_extra[64] ; 572 char rinfo_label[64] ; /* 11 Mar 2020 */ 573 574 /* text for sides of window in default orientation [01 Dec 1999] */ 575 576 char winfo_sides[4][16] ; 577 char winfo_prefix[16] ; /* 10 Dec 2007 */ 578 579 /* opacity of overlay */ 580 581 float ov_opacity ; /* 07 Mar 2001 */ 582 MCW_arrowval *ov_opacity_av ; 583 Widget ov_opacity_sep ; /* 08 Mar 2001 */ 584 585 Widget record_rc , record_cbut; /* 24 Apr 2001: recording stuff */ 586 MCW_bbox *record_status_bbox ; 587 MCW_bbox *record_method_bbox ; 588 int record_status ; 589 int record_method ; 590 int record_mode ; 591 struct MCW_imseq *record_imseq ; /* an image viewer inside an image viewer! */ 592 MRI_IMARR *record_imarr ; 593 MEM_plotdata **record_mplot ; /* 05 Jan 2005 */ 594 595 MCW_bbox *save_one_bbox ; /* 26 Jul 2001 */ 596 MCW_bbox *save_agif_bbox ; /* 27 Jul 2001 */ 597 598 float clbot,cltop , barbot,bartop ; /* 29 Jul 2001 */ 599 600 MEM_plotdata *mplot ; /* 19 Sep 2001 */ 601 MCW_bbox *wbar_plots_bbox ; /* 20 Sep 2001 */ 602 MCW_arrowval *wbar_label_av ; /* 20 Sep 2001 */ 603 MCW_arrowval *wbar_labsz_av ; /* 21 Sep 2001 */ 604 MCW_arrowval *wbar_globrange_av ; /* 30 Jan 2013 */ 605 606 Widget wbar_labst_pb ; /* 23 Dec 2011 */ 607 608 Widget zoom_sep /* 11 Mar 2002 */; 609 MCW_arrowval *zoom_val_av ; 610 Widget zoom_drag_pb ; 611 int zoom_fac ; 612 float zoom_hor_off, zoom_ver_off ; 613 int zoom_pw , zoom_ph ; 614 Pixmap zoom_pixmap ; 615 XImage *zoom_xim ; 616 int zoom_button1 , zoom_xp,zoom_yp ; /* 15 Mar 2002 */ 617 618 int cropit , crop_xa,crop_xb , crop_ya,crop_yb ; /* 11 Jun 2002 */ 619 int crop_nxorg , crop_nyorg , crop_allowed ; 620 Widget crop_drag_pb ; /* 17 Jun 2002 */ 621 int crop_drag ; 622 int crop_autocenter ; /* 14 Jan 2014 */ 623 MCW_bbox *wbar_crop_bbox ; /* 15 Jan 2014 */ 624 625 int button2_width ; /* 08 Oct 2002 */ 626 627 int cursor_state ; /* 10 Mar 2003 */ 628 629 MCW_bbox *pen_bbox ; /* 18 Jul 2003 */ 630 631 int last_bx,last_by ; /* 23 Oct 2003 */ 632 int cmap_changed ; 633 634 int do_graymap ; /* 24 Oct 2003 */ 635 MEM_topshell_data *graymap_mtd ; 636 Widget wbar_graymap_pb ; 637 638 XtIntervalId timer_id ; /* 03 Dec 2003 */ 639 int timer_func, timer_param, timer_delay ; 640 641 int dont_place_dialog ; /* 23 Jan 2004 */ 642 643 MCW_arrowval *wbar_ticnum_av, *wbar_ticsiz_av ; /* 23 Feb 2004 */ 644 645 float last_dx , last_dy ; /* 08 Jun 2004 */ 646 647 float rgb_gamma ; /* 25 Apr 2005 */ 648 float rgb_offset ; 649 650 char scl_label[16] ; /* 02 Nov 2005 */ 651 652 float top_clip ; /* 14 Sep 2007 */ 653 int redo_clip ; /* 17 Sep 2007 */ 654 655 int render_mode ; /* 25 Oct 2008 */ 656 MCW_arrowval *wbar_checkbrd_av ; 657 float render_fac ; /* 22 Aug 2014 */ 658 Widget render_scal ; 659 int allowmerger ; 660 661 MCW_arrowval *wbar_animdup_av ; /* 10 Feb 2009 */ 662 663 int shft_ctrl_dragged ; /* 17 Mar 2010 */ 664 665 char *overlay_label ; /* 23 Dec 2011 */ 666 } MCW_imseq ; 667 668 /* codes for how the underlay and overlay images are to be combined */ 669 670 #define RENDER_DEFAULT 0 671 #define RENDER_CHECK_UO 1 /* checkerboard */ 672 #define RENDER_CHECK_OU 2 673 #define RENDER_WIPE_LEFT 3 /* wipers */ 674 #define RENDER_WIPE_BOT 4 675 #define RENDER_MIX 5 /* blending */ 676 #define RENDER_WIPE_RIGHT 6 677 #define RENDER_WIPE_TOP 7 678 #define RENDER_LASTMODE 7 679 680 /* Stuff for the timer functions, like the 'v' key produces */ 681 682 #define ISQ_TIMERFUNC_INDEX 701 683 #define ISQ_TIMERFUNC_BOUNCE 702 684 685 extern void ISQ_timer_CB( XtPointer , XtIntervalId * ) ; /* 03 Dec 2003 */ 686 extern void ISQ_timer_stop( MCW_imseq * ) ; 687 688 /* Callbacks for zooming, cropping */ 689 690 extern void ISQ_zoom_av_CB( MCW_arrowval *, XtPointer ) ; 691 extern void ISQ_zoom_pb_CB( Widget, XtPointer, XtPointer ) ; 692 extern void ISQ_crop_pb_CB( Widget, XtPointer, XtPointer ) ; 693 extern void ISQ_actually_pan( MCW_imseq * , int , int ) ; 694 extern int ISQ_show_zoom( MCW_imseq *seq ) ; 695 extern void ISQ_center_zoom( MCW_imseq *seq ) ; /* 27 Aug 2009 */ 696 697 extern void ISQ_adjust_crop( MCW_imseq *,int,int,int,int,int) ; /* 25 Aug 2009 */ 698 extern void ISQ_set_crop_hint( MCW_imseq *seq ) ; 699 700 /* changing the cursor in the image, for cropping or drawing */ 701 702 #define CURSOR_NORMAL 0 /* 10 Mar 2003 */ 703 #define CURSOR_PENCIL 1 704 #define CURSOR_CROSSHAIR 2 /* 18 Jul 2003 */ 705 706 extern void ISQ_set_cursor_state( MCW_imseq * , int ) ; 707 708 extern void ISQ_pen_bbox_CB( Widget, XtPointer, XtPointer ) ; /* 18 Jul 2003 */ 709 710 /*--------------------------------------------------------------------*/ 711 712 #define ISQ_LABEL_OFF 0 /* 20 Sep 2001 */ 713 #define ISQ_LABEL_UPLF 1 714 #define ISQ_LABEL_UPRT 2 715 #define ISQ_LABEL_DNLF 3 716 #define ISQ_LABEL_DNRT 4 717 #define ISQ_LABEL_UPMD 5 718 #define ISQ_LABEL_DNMD 6 719 720 /*--------------------------------------------------------------------*/ 721 /* For the 'left=Left' stuff at the bottom of an image */ 722 723 #define ISQ_USE_SIDES(isq) ( (isq)->winfo_sides[0][0] != '\0' || \ 724 (isq)->winfo_sides[1][0] != '\0' || \ 725 (isq)->winfo_sides[2][0] != '\0' || \ 726 (isq)->winfo_sides[3][0] != '\0' ) 727 728 /***---------- prototypes: user callable ----------***/ 729 730 extern MCW_imseq * open_MCW_imseq( MCW_DC * , get_ptr , XtPointer ) ; 731 732 /* Drive Reasons for the next routine */ 733 734 #define isqDR_imhelptext 101 735 #define isqDR_options 102 736 #define isqDR_numtotal 103 737 #define isqDR_cursor 104 738 #define isqDR_unrealize 105 739 #define isqDR_realize 106 740 #define isqDR_display 107 741 #define isqDR_overlay 108 742 #define isqDR_arrowpadon 109 743 #define isqDR_reimage 110 744 #define isqDR_reshow 111 745 #define isqDR_newseq 112 746 #define isqDR_arrowpadoff 113 747 #define isqDR_title 114 748 #define isqDR_clearstat 115 749 #define isqDR_onoffwid 116 750 #define isqDR_getimnr 117 751 #define isqDR_icon 118 752 #define isqDR_sendmontage 119 753 #define isqDR_periodicmont 120 754 #define isqDR_setmontage 121 755 #define isqDR_montmode 122 756 #define isqDR_setifrac 130 757 #define isqDR_setrange 131 758 #define isqDR_bgicon 132 759 #define isqDR_settopclip 133 /* 14 Sep 2007 */ 760 #define isqDR_allowmerger 134 /* 25 Aug 2014 */ 761 762 #define isqDR_arrowpadhint 201 763 #define isqDR_winfotext 202 764 #define isqDR_getoptions 203 765 #define isqDR_winfosides 204 766 #define isqDR_winfoprefix 205 767 #define isqDR_rinfolabel 211 768 769 #define isqDR_destroy 666 770 771 #define isqDR_offwid 0 772 #define isqDR_onwid 1 773 #define isqDR_togwid 2 774 775 #define isqDR_button2_enable 501 776 #define isqDR_button2_disable 502 777 #define isqDR_button2_pixel 503 778 #define isqDR_button2_mode 504 779 #define isqDR_button2_width 505 780 781 #define isqDR_ignore_redraws 521 782 #define isqDR_keypress 522 /* 18 Feb 2005 */ 783 784 #define isqDR_pressbut_Colr 533 /* 25 Oct 2019 */ 785 #define isqDR_pressbut_Swap 534 786 #define isqDR_pressbut_Norm 535 787 788 #define BUTTON2_OPENPOLY 0 789 #define BUTTON2_CLOSEDPOLY 1 790 #define BUTTON2_POINTS 2 791 #define BUTTON2_NODRAW 3 792 793 #define isqDR_rebar 602 /* 23 Aug 1998 */ 794 #define isqDR_opacitybut 603 /* 07 Mar 2001 */ 795 #define isqDR_record_mode 604 /* 24 Apr 2001 */ 796 #define isqDR_record_disable 605 /* 24 Apr 2001 */ 797 #define isqDR_zoombut 606 /* 11 Mar 2002 */ 798 #define isqDR_getopacity 607 /* 21 Jan 2003 */ 799 #define isqDR_setopacity 608 /* 21 Jan 2003 */ 800 #define isqDR_setimsave 609 /* 23 Jan 2003 */ 801 #define isqDR_penbbox 610 /* 18 Jul 2003 */ 802 #define isqDR_get_crop 611 /* 03 May 2007 */ 803 #define isqDR_set_crop 612 /* 03 May 2007 */ 804 #define isqDR_get_zoom 613 /* 10 Dec 2019 */ 805 #define isqDR_set_zoom 614 /* 10 Dec 2019 */ 806 #define isqDR_get_panoff 615 /* 10 Dec 2019 */ 807 #define isqDR_set_panoff 616 /* 10 Dec 2019 */ 808 809 #define isqDR_plot_label 701 /* 20 Sep 2001 */ 810 #define isqDR_plot_plot 702 /* 20 Sep 2001 */ 811 #define isqDR_save_jpeg 703 /* 28 Jul 2005 */ 812 #define isqDR_save_agif 704 /* 07 Dec 2006 */ 813 #define isqDR_save_mpeg 705 /* 07 Dec 2006 */ 814 #define isqDR_save_jpegall 706 /* 07 Dec 2006 */ 815 #define isqDR_save_png 707 /* 11 Dec 2006 */ 816 #define isqDR_save_filtered 708 /* 14 Dec 2006 */ 817 #define isqDR_save_pngall 709 /* 15 Dec 2006 */ 818 #define isqDR_save_raw 710 /* 13 Nov 2007 */ 819 #define isqDR_save_rawmont 711 /* 13 Nov 2007 */ 820 821 /* function to 'drive' an image viewer with one of the isqDR codes above */ 822 823 extern RwcBoolean drive_MCW_imseq( MCW_imseq * , int , XtPointer ) ; 824 825 extern RwcBoolean ISQ_setup_new( MCW_imseq * , XtPointer ) ; 826 827 /*** prototypes: internals ***/ 828 829 extern void ISQ_redisplay( MCW_imseq * , int , int ) ; 830 831 extern MCW_imseq_status * ISQ_copy_status( MCW_imseq_status * ) ; 832 833 extern void ISQ_reset_dimen( MCW_imseq * , float , float ) ; 834 835 extern void ISQ_scale_CB( Widget , XtPointer , XtPointer ) ; 836 837 extern void ISQ_wbar_plots_CB( Widget , XtPointer , XtPointer ) ; /* 20 Sep 2001 */ 838 extern void ISQ_wbar_label_CB( MCW_arrowval * , XtPointer ) ; 839 extern void ISQ_wbar_globrange_CB( MCW_arrowval * , XtPointer ) ; 840 extern void ISQ_wbar_amask_CB( Widget , XtPointer , XtPointer ) ; /* 14 Jun 2010 */ 841 extern void ISQ_wbar_invrt_CB( Widget , XtPointer , XtPointer ) ; /* 14 Sep 2020 */ 842 extern void ISQ_wbar_crop_CB ( Widget , XtPointer , XtPointer ) ; /* 15 Jan 2014 */ 843 844 extern void ISQ_wbar_menu_CB( Widget , XtPointer , XtPointer ) ; 845 extern void ISQ_set_rng_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 846 extern void ISQ_set_zcol_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 847 extern void ISQ_set_flat_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 848 extern void ISQ_set_sharp_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 849 extern void ISQ_overlay_label_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 850 extern void ISQ_set_vgize_CB( Widget , XtPointer , MCW_choose_cbs * ) ; 851 852 extern void ISQ_but_disp_CB( Widget , XtPointer , XtPointer ) ; 853 extern void ISQ_but_save_CB( Widget , XtPointer , XtPointer ) ; 854 extern void ISQ_but_done_CB( Widget , XtPointer , XtPointer ) ; 855 extern void ISQ_but_color_CB( Widget , XtPointer , XtPointer ) ; 856 extern void ISQ_but_cswap_CB( Widget , XtPointer , XtPointer ) ; 857 extern void ISQ_but_cnorm_CB( Widget , XtPointer , XtPointer ) ; 858 859 extern void ISQ_place_dialog( MCW_imseq * ) ; /* 05 Jan 1999 */ 860 extern void ISQ_place_widget( Widget, Widget ) ; /* 27 Oct 2003 */ 861 862 #undef REQUIRE_TWO_DONES 863 #ifdef REQUIRE_TWO_DONES 864 extern void ISQ_but_done_reset( MCW_imseq * ) ; 865 #else 866 # define ISQ_but_done_reset(xx) /* nada */ 867 #endif 868 869 extern void ISQ_disp_act_CB( Widget , XtPointer , XtPointer ) ; 870 871 extern void ISQ_drawing_EV( Widget , XtPointer , XEvent * , RwcBoolean * ) ; 872 extern void ISQ_button2_EV( Widget , XtPointer , XEvent * , RwcBoolean * ) ; 873 874 extern void ISQ_make_image( MCW_imseq * ) ; 875 extern void ISQ_show_image( MCW_imseq * ) ; 876 extern void ISQ_draw_winfo( MCW_imseq * ) ; 877 878 /* 06 Mar 2001 */ 879 extern MRI_IMAGE * ISQ_overlay( MCW_DC *, MRI_IMAGE *, MRI_IMAGE *, float ) ; 880 #define ISQ_GOOD_OVERLAY_TYPE(dt) ( (dt)==MRI_short || (dt)==MRI_rgb || (dt)==MRI_rgba ) 881 /* 13 Feb 2020 */ 882 extern MRI_IMAGE * ISQ_overlay_rgba( MCW_DC *dc , MRI_IMAGE *ulim, MRI_IMAGE *ovim, float alpha ) ; 883 884 extern MRI_IMAGE * ISQ_binarize_overlay( MRI_IMAGE * ) ; /* Mar 2013 */ 885 886 extern void ISQ_apply_mask( MRI_IMAGE * , MRI_IMAGE * ) ; /* 12 Dec 2014 */ 887 888 /* 07 Mar 2001 */ 889 extern void ISQ_opacity_CB( MCW_arrowval * , XtPointer ) ; 890 extern char * ISQ_opacity_label( int ) ; 891 extern MRI_IMAGE * ISQ_index_to_rgb( MCW_DC * , int , MRI_IMAGE * ) ; 892 #define ISQ_SKIP_OVERLAY(isq) \ 893 ( (isq)->opt.no_overlay || (isq)->ov_opacity == 0.0 || (isq)->render_mode > 0 ) 894 895 extern MRI_IMAGE * ISQ_manufacture_one( int nim , int overlay , MCW_imseq * seq ) ; 896 extern void ISQ_make_montage( MCW_imseq * ) ; 897 898 extern void ISQ_make_bar( MCW_imseq * ) ; 899 extern void ISQ_show_bar( MCW_imseq * ) ; 900 extern void ISQ_set_barhint( MCW_imseq * , char * ) ; /* 29 Jul 2001 */ 901 902 #define PFLAG_NOTRAN0D 1 903 #define PFLAG_NOTRAN2D 2 904 #define PFLAG_NOTRAN (PFLAG_NOTRAN0D | PFLAG_NOTRAN2D) 905 #define PFLAG_NOIMPROC 4 906 #define PFLAG_NOTHING 65535 907 908 extern MRI_IMAGE * ISQ_process_mri( int , MCW_imseq * , MRI_IMAGE * , int ) ; 909 910 extern MRI_IMAGE * ISQ_getimage ( int , MCW_imseq * ) ; /* 31 Jan 2002 */ 911 extern MRI_IMAGE * ISQ_getoverlay( int , MCW_imseq * ) ; /* 11 Jun 2002 */ 912 extern MEM_plotdata * ISQ_getmemplot( int , MCW_imseq * ) ; 913 extern char * ISQ_getlabel ( int , MCW_imseq * ) ; 914 extern MRI_IMAGE * ISQ_getchecked( int nn , MCW_imseq *seq ) ; 915 extern int_triple ISQ_get_crosshairs( MCW_imseq *seq ) ; /* 27 Aug 2009 */ 916 917 extern void ISQ_render_scal_CB( Widget , XtPointer , XtPointer ) ; /* 22 Aug 2014 */ 918 extern void ISQ_destroy_render_scal( MCW_imseq *seq ) ; 919 920 extern void ISQ_free_alldata( MCW_imseq * ) ; 921 922 extern int ISQ_set_image_number( MCW_imseq * , int ) ; 923 924 extern RwcBoolean ISQ_disp_options( MCW_imseq * , RwcBoolean ) ; 925 926 /* type for defining buttons */ 927 928 typedef struct { 929 char * name ; 930 XtCallbackProc func_CB ; 931 932 XtPointer parent , aux ; 933 } ISQ_bdef ; 934 935 RwcBoolean ISQ_statistics_WP( XtPointer ) ; 936 937 void ISQ_statify_one( MCW_imseq * , int , MRI_IMAGE * ) ; 938 void ISQ_statify_all( MCW_imseq * , RwcBoolean ) ; 939 940 void ISQ_perpoints( float,float , int h[] , float * , float * ) ; 941 942 void ISQ_mapxy ( MCW_imseq * , int,int , int *,int *,int * ) ; 943 void ISQ_flipxy ( MCW_imseq * , int *,int * ) ; 944 void ISQ_unflipxy( MCW_imseq * , int *,int * ) ; 945 946 void ISQ_arrow_CB( MCW_arrowval * , XtPointer ) ; 947 948 void ISQ_arrowpad_CB( MCW_arrowpad * , XtPointer ) ; 949 950 extern void ISQ_transform_CB ( MCW_arrowval * , XtPointer ) ; 951 extern char * ISQ_transform_label( MCW_arrowval * , XtPointer ) ; 952 953 extern void ISQ_slice_proj_CB ( MCW_arrowval * , XtPointer ) ; 954 955 #define ROWGRAPH_MAX 9 956 #define SURFGRAPH_MAX 2 957 958 #define ROWGRAPH_MASK 1 959 #define SURFGRAPH_MASK 2 960 #define GRAYMAP_MASK 4 /* 24 Oct 2003 */ 961 962 extern void ISQ_rowgraph_CB ( MCW_arrowval * , XtPointer ) ; 963 extern char * ISQ_rowgraph_label( MCW_arrowval * , XtPointer ) ; 964 extern void ISQ_rowgraph_draw( MCW_imseq * seq ) ; 965 extern void ISQ_rowgraph_mtdkill( MEM_topshell_data * mp ) ; 966 967 extern void ISQ_graymap_draw( MCW_imseq * seq ) ; /* 24 Oct 2003 */ 968 extern void ISQ_graymap_mtdkill( MEM_topshell_data * mp ) ; 969 970 extern void ISQ_surfgraph_CB ( MCW_arrowval * , XtPointer ) ; 971 extern char * ISQ_surfgraph_label( MCW_arrowval * , XtPointer ) ; 972 extern void ISQ_surfgraph_draw( MCW_imseq * seq ) ; 973 extern void ISQ_surfgraph_mtdkill( MEM_topshell_data * mp ) ; 974 extern MEM_plotdata * plot_image_surface( MRI_IMAGE * , float,float,float,int,int ) ; 975 extern void ISQ_surfgraph_arrowpad_CB( MCW_arrowpad * , XtPointer ) ; 976 977 /*---- temporary, I hope (yeah, sure, right, uh huh) ----*/ 978 979 extern void ISQ_saver_CB( Widget w , XtPointer cd , int nval , void **val ) ; 980 981 extern MEM_plotdata * ISQ_plot_label( MCW_imseq *, char * ) ; /* 20 Sep 2001 */ 982 983 /*---- 24 Apr 2001: image recorder stuff (the viewer within a viewer) ----*/ 984 985 #define RECORD_STATUS_OFF (1<<0) 986 #define RECORD_STATUS_NEXTONE (1<<1) 987 #define RECORD_STATUS_ON (1<<2) 988 989 #define RECORD_ISON(ib) ((ib) > RECORD_STATUS_OFF) 990 991 #define RECORD_METHOD_AFTEREND (1<<0) 992 #define RECORD_METHOD_BEFORESTART (1<<1) 993 #define RECORD_METHOD_INSERT_MM (1<<2) 994 #define RECORD_METHOD_INSERT_PP (1<<3) 995 #define RECORD_METHOD_OVERWRITE (1<<4) 996 #define RECORD_METHOD_OVERWRITE_MM (1<<5) 997 #define RECORD_METHOD_OVERWRITE_PP (1<<6) 998 999 extern void ISQ_record_button( MCW_imseq * ) ; 1000 extern void ISQ_record_CB( Widget,XtPointer,XtPointer ) ; 1001 extern void ISQ_butsave_EV( Widget, XtPointer, XEvent *, RwcBoolean * ) ; 1002 extern void ISQ_butcrop_EV( Widget, XtPointer, XEvent *, RwcBoolean * ) ; 1003 extern void ISQ_butdisp_EV( Widget, XtPointer, XEvent *, RwcBoolean * ) ; 1004 1005 extern void ISQ_record_open( MCW_imseq * ) ; 1006 extern void ISQ_record_update( MCW_imseq * , int ) ; 1007 extern void ISQ_record_addim( MCW_imseq * , int,int ) ; 1008 extern XtPointer ISQ_record_getim( int , int , XtPointer ) ; 1009 extern void ISQ_record_send_CB( MCW_imseq * , XtPointer , ISQ_cbs * ) ; 1010 extern void ISQ_record_kill_CB( Widget , XtPointer , XtPointer ) ; 1011 1012 extern void ISQ_remove_widget( MCW_imseq * , Widget ) ; 1013 extern void ISQ_cropper( MCW_imseq *, XButtonEvent *) ; /* 17 Jun 2002 */ 1014 1015 #define MINCROP 9 /* moved here 03 May 2007 */ 1016 1017 /* Stuff for makeing snapshots of Widgets, etc. 1018 Also see functions in xim.c for snapshots directly to disk files. */ 1019 1020 extern void ISQ_snapshot( Widget w ) ; /* 18 Jun 2003 */ 1021 extern void ISQ_snapsave( int,int, byte *, Widget ) ; /* 03 Jul 2003 */ 1022 extern MRI_IMAGE * ISQ_snap_to_mri_image( int , int , byte *); /* Dec 2011 */ 1023 extern MRI_IMAGE * ISQ_snap4_to_mri_image( int , int , byte *); /* May 2013 */ 1024 extern void ISQ_snap_agif( char * ) ; /* 06 Dec 2006 */ 1025 extern void ISQ_snap_mpeg( char * ) ; 1026 extern void ISQ_snap_jpeg( char * ) ; 1027 extern void ISQ_snap_png ( char * ) ; 1028 extern void ISQ_snap_agif_rng( char *,int,int ) ; /* 07 Dec 2006 */ 1029 extern void ISQ_snap_mpeg_rng( char *,int,int ) ; 1030 extern void ISQ_snap_jpeg_rng( char *,int,int ) ; 1031 extern void ISQ_snap_png_rng ( char *,int,int ) ; 1032 1033 /* for dealing with keypress events */ 1034 1035 extern int ISQ_handle_keypress( MCW_imseq *, unsigned long, unsigned int ); /* 18 Feb 2005 */ 1036 1037 extern void mri_rgb_transform_nD( MRI_IMAGE *, int, generic_func * ) ; 1038 1039 extern void ISQ_save_jpeg( MCW_imseq *seq , char *fname ) ; /* 28 Jul 2005 */ 1040 extern void ISQ_save_png ( MCW_imseq *seq , char *fname ) ; /* 11 Dec 2006 */ 1041 extern void ISQ_save_anim( MCW_imseq *, char *, int,int,int ); /* 06 Dec 2006 */ 1042 1043 extern void ISQ_save_raw ( MCW_imseq *seq , char *fname ) ; /* 13 Nov 2007 */ 1044 extern void ISQ_save_rawmont( MCW_imseq *seq , char *fname ) ; /* 13 Nov 2007 */ 1045 1046 extern void ISQ_save_image( MCW_imseq *, char *, char *, char *); /* 11 Dec 2006 */ 1047 1048 extern void ISQ_setup_ppmto_filters(void); /* 11 May 2006 */ 1049 void SNAP_NoDuplicates (void); 1050 void SNAP_OkDuplicates (void); 1051 1052 1053 #ifdef __cplusplus 1054 } 1055 #endif 1056 1057 #endif /* _MCW_IMSEQ_HEADER_ */ 1058