1 #include "SUMA_suma.h"
2
3 extern SUMA_CommonFields *SUMAg_CF;
4
5 static char s_ver[100];
6
SUMA_ver2date(int ver)7 static char * SUMA_ver2date(int ver)
8 {
9 int yy, mm, dd;
10 yy = ver/10000;
11 mm = (ver % 10000) / 100;
12 dd = ver % 100;
13 sprintf(s_ver,"%d_%d_%d", yy, mm, dd);
14 return(s_ver);
15 }
16
17
18 /*!
19 \brief Returns a string with the new additions and version information
20
21 \param ver (float) v (v > 0) for info on version v alone
22 0.0 just the latest version info
23 -1.0 for all versions
24 \param StampOnly (SUMA_Boolean) Want version number and time stamp only ?
25
26 \return s (char *) the string, yall have to free it with SUMA_free
27 \sa SUMA_New_Additions_perver
28
29 - To add a new version, you must add a case statement in SUMA_New_Additions_perver
30 AND add the version number in the beginning of SUMA_VERSION_VECTOR in SUMA_DataSets.h
31 */
32
33 static int verv[] = { SUMA_VERSION_VECTOR };
34
SUMA_New_Additions(int ver,SUMA_Boolean StampOnly)35 char * SUMA_New_Additions (int ver, SUMA_Boolean StampOnly)
36 {
37 static char FuncName[]={"SUMA_New_Additions"};
38 char *s = NULL;
39 int i;
40 SUMA_STRING *SS = NULL;
41
42 SUMA_ENTRY;
43
44 SS = SUMA_StringAppend (NULL, NULL);
45
46 #if 0 /* Stopped maintaining this list for a long time now. */
47 if (ver == 0) { /* just the latest */
48 s = SUMA_New_Additions_perver( verv[0], StampOnly);
49 if (s) {
50 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
51 }
52 } else if (ver < 0) {
53 /* all history */
54 SS = SUMA_StringAppend (SS, "All Version Info:\n");
55 i = 0;
56 while (verv[i] > 0) {
57 s = SUMA_New_Additions_perver( verv[i], StampOnly);
58 if (s) {
59 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
60 SS = SUMA_StringAppend (SS, "\n");
61 }
62 ++i;
63 }
64
65 } else {
66 /* just for ver */
67 s = SUMA_New_Additions_perver( ver, StampOnly);
68 if (s) {
69 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
70 }
71 }
72 /* add the CVS tag ZSS: Looks like nobody likes tags.
73 Compile Date is enough*/
74 SS = SUMA_StringAppend_va (SS, "\nCVS tag:\n %s\n", SUMA_VERSION_LABEL);
75 #endif
76
77 /* add the compile date */
78 SS = SUMA_StringAppend_va (SS, "\nCompile Date:\n %s\n",__DATE__);
79
80 /* clean SS */
81 SS = SUMA_StringAppend (SS, NULL);
82 /* copy s pointer and free SS */
83 s = SS->s;
84 SUMA_free(SS);
85
86 SUMA_RETURN(s);
87
88 }
89
90
91 /*!
92 \brief Returns a string with version information
93 \param ver (float) Version number
94 \param StampOnly (SUMA_Boolean) if YUP
95 then return the time stamp of the version only)
96 \return s (char *) the string, yall have to free it with SUMA_free
97 \sa SUMA_New_Additions
98
99 - To add a new version, you must add a case statement in SUMA_New_Additions_perver
100 AND add the version number in the beginning of SUMA_VERSION_VECTOR in SUMA_DataSets.h
101 */
SUMA_New_Additions_perver(int ver,SUMA_Boolean StampOnly)102 char * SUMA_New_Additions_perver (int ver, SUMA_Boolean StampOnly)
103 {
104 static char FuncName[]={"SUMA_New_Additions_perver"};
105 char *s = NULL;
106 SUMA_STRING *SS = NULL;
107
108 SUMA_ENTRY;
109
110 SS = SUMA_StringAppend (NULL, NULL);
111
112
113 switch (ver) {
114 /* Must modify SUMA_VERSION_VECTOR in SUMA_DataSets.h when add a new case */
115 /*
116 case XX:
117 SS = SUMA_StringAppend_va(SS,
118 "++ SUMA version %s\n", SUMA_ver2date(ver)); if (StampOnly) break;
119 SS = SUMA_StringAppend(SS,
120 "New Programs:\n"
121 " + \n"
122 "Modifications:\n"
123 " + \n");
124 break;
125 */
126 case 20060703:
127 SS = SUMA_StringAppend_va(SS,
128 "++ SUMA version %s\n", SUMA_ver2date(ver)); if (StampOnly) break;
129 SS = SUMA_StringAppend(SS,
130 "New Programs:\n"
131 " + SurfDsetInfo: Program to display surface dataset information.\n"
132 " + AnalyzeTrace: Program to analyze the output of -trace option.\n"
133 " + DriveSuma: Program to control SUMA from the command line\n"
134 " + 2dcat: Program to catenate images.\n"
135 " + Surf2VolCoord: Surface-node to voxel correspondence.\n"
136 " + SurfDist: Program to calculate internodal distances.\n"
137 " + SpharmDeco: Spherical harmonics decomposition.\n"
138 " + SpharmReco: Spherical harmonics reconstruction.\n"
139 "Modifications:\n"
140 " + SUMA:\n"
141 " o Addition of new Displayable Objects (DO)(ctrl+Alt+s)\n"
142 " o Allow replacement of pre-loaded DO and Dsets\n"
143 " o Support for .niml.dset as format for surface-based anlysis\n"
144 " o High resolution image saving with ctrl+r\n"
145 " o Bug fixes for support of niml dset format\n"
146 " o Use of '[i]' to select node index from surface dset\n"
147 " o Scroll lists for I T and B selectors in SUMA\n"
148 " o Graphing of dset content with 'g'\n"
149 " o Display of text and images, see suma -help_nido \n"
150 " + SurfDist:\n"
151 " o Output of node path along with shortest distance.\n"
152 " + ConvertDset:\n"
153 " o Output of full dsets if needed\n"
154 " + ROIgrow:\n"
155 " o Grows regions separately, depending on labels.\n"
156 " + ROI2dataset:\n"
157 " o outputs full datasets if needed.\n"
158 " + SurfSmooth:\n"
159 " o Improved HEAT_05 method.\n"
160 " o New 'blurring to' a FWHM with HEAT_07 method.\n"
161 " + SurfFWHM:\n"
162 " o Estimating FWHM on the surface.\n"
163 " + MapIcosahedron:\n"
164 " o Better handling of surface centers. \n"
165 );
166 break;
167 case 20041229:
168 SS = SUMA_StringAppend_va(SS,
169 "++ SUMA version %s\n", SUMA_ver2date(ver)); if (StampOnly) break;
170 SS = SUMA_StringAppend(SS,
171 "New Programs:\n"
172 " + SurfClust: Program to find clusters of activation\n"
173 " on the surface.\n"
174 " + IsoSurface: Program to create isosurfaces from AFNI volumes.\n"
175 " + ConvexHull: Program to create the convex hull of a set of\n"
176 " points.\n"
177 " + 3dSkullStrip: Program to remove the skull from anatomical \n"
178 " volumes.\n"
179 " + 3dCRUISEtoAFNI: Program to convert CRUISE volumes to AFNI\n"
180 " + 3dBRAIN_VOYAGERtoAFNI: Program to convert BrainVoyager .vmr\n"
181 " volumes to AFNI\n"
182 " + SurfMesh: Program to increase or decrease a mesh's density.\n"
183 " + SurfMask: Program to find the volume enclosed by a surface.\n"
184 " + SurfToSurf: Program to interpolate between non-isotopic surfaces.\n"
185 " + ROIgrow: Program to expand an ROI on the surface.\n"
186 "Modifications:\n"
187 " + SUMA:\n"
188 " o Slight modification to threshold scale.\n"
189 " o Added environment variable SUMA_ThresholdScalePower.\n"
190 " o Fixed a few kinks in the surface controller.\n"
191 " o Fixed ROI drawing trace on OSX.\n"
192 " o Added geodesic distance measurements in ROI drawing\n"
193 " controller.\n"
194 " o Suma can read surfaces specified on command line.\n"
195 " o Fixed bug reading AFNI generated niml files.\n"
196 " o Useful axis displayed with F2 key.\n"
197 " o Fixed bug with recursive function used to fill ROIs.\n"
198 " o Support for reading CRUISE surfaces in OpenDX format\n"
199 " o Support for reading BrainVoyager surfaces (.srf) format\n"
200 " o Mouse motion effect is modulated with Zoom level\n"
201 " o F8 toggles between orthographic and perspective viewing\n"
202 " o Fixed bug causing crash in SUMA_MixColorOverlays\n"
203 " + ConvertSurface:\n"
204 " o Option -make_consistent added to make the winding\n"
205 " of the mesh consistent. \n"
206 " o Option to project surface nodes to sphere\n"
207 " + SurfQual:\n"
208 " o Checks and warns about mesh's winding inconsistency.\n"
209 " + SurfSmooth:\n"
210 " o Added NN_geom, nearest neighbor interpolation option.\n"
211 " o Combined with -match_vol or -match_area, this geometry\n"
212 " smoothing mode can be used to inflate surfaces.\n"
213 " o New weighting for Taubin geometry filtering.\n"
214 " o Option for masking nodes to be filtered.\n"
215 " o New HEAT method for filtering data.\n"
216 " + SurfaceMetrics:\n"
217 " o Option -vol calculates the volume of the closed surface.\n"
218 " + SurfPatch:\n"
219 " o Option -vol to calculate the volume between two isotopic\n"
220 " surface patches.\n"
221 " + ROI2dataset:\n"
222 " o Option -pad_to_node and -pad_label to output datasets\n"
223 " containing full node listings.\n"
224 " + ConvertDset:\n"
225 " o Option -o_1dp was added to write 1D file data only,\n"
226 " without additional comments.\n"
227 " + SurfaceMetrics:\n"
228 " o Options for finding surface boundaries.\n"
229 " + 3dSkullStrip:\n"
230 " o Fixed bug on 64 bit machines.\n"
231 );
232 break;
233
234 case 20040610: /* used to be 25000 */
235 SS = SUMA_StringAppend_va(SS,
236 "++ SUMA version %s (used to be 2.500)\n", SUMA_ver2date(ver)); if (StampOnly) break;
237 SS = SUMA_StringAppend(SS,
238 "Modifications:\n"
239 " + SUMA's surface controller 'ctrl+s' has been\n"
240 " vastly improved. \n"
241 " Of note are the following features:\n"
242 " - interactive color mapping\n"
243 " - thresholding controls \n"
244 " - brightness modulation\n"
245 " - choice of colormaps\n"
246 " - coordinate bias (tres tres cool)\n"
247 " - info on current cross hair location\n"
248 " Use Bhelp button in the controller for detailed help.\n"
249 " + 3dVol2Surf can output NIML formatted datasets.\n"
250 " Options -first_node and -last_node can be used\n"
251 " to restrict the mapping to a subset of the nodes.\n"
252 " That is useful if your output file size exceeds 2GB.\n"
253 "Bug Fix:\n"
254 " + Fixed bug on Mac OS-X that cause all viewers to close\n"
255 " after pressing 'Yes' on the 'Close this viewer' prompt.\n"
256 );
257 break;
258
259 case 20040116: /* used to be 24800 */
260 SS = SUMA_StringAppend_va(SS,
261 "++ SUMA version %s (used to be 2.480)\n", SUMA_ver2date(ver)); if (StampOnly) break;
262 SS = SUMA_StringAppend(SS,
263 "New Programs:\n"
264 " + FS_readannot: Program to read FreeSurfer's\n"
265 " annotation files.\n"
266 " + SurfPatch: Program to create surface patches\n"
267 " from a set of nodes.\n"
268 " + SurfQual: Program to report defects in surfaces.\n"
269 " For the moment, works on spherical \n"
270 " surfaces only.\n"
271 "Modifications:\n"
272 " + Added affine transforms to ConvertSurface.\n"
273 " + Added datasets into SUMA's code (no interface).\n"
274 " + Added saving/loading of viewer settings.\n"
275 " + Beginning of multiple group support in SUMA.\n"
276 " + Redisplays of Surface Viewers due to X events\n"
277 " are no longer passed to the image recorder.\n" );
278 break;
279
280 case 20040106: /* used to be 24500 */
281 SS = SUMA_StringAppend_va(SS,
282 "++ SUMA version %s (used to be 2.450)\n", SUMA_ver2date(ver)); if (StampOnly) break;
283 SS = SUMA_StringAppend(SS,
284 "New Programs:\n"
285 " + inspec: Shows the contents of a spec file\n"
286 " + quickspec: Creates a minimal spec file for one\n"
287 " or a bunch of surfaces.\n"
288 " + SurfSmooth: Smoothes surface data or geometry\n"
289 " + SurfMeasures: Outputs various surface attributes \n"
290 " and measurements such as:\n"
291 " Thickness, Area, Volume, etc.\n"
292 "Modifications:\n"
293 " + Foreground color smoothing option (SUMA keyb. 8)\n"
294 " + No more MappingRef field in Spec files.\n"
295 " The field is broken up into a set of other\n"
296 " fields for more flexibility.\n"
297 " + Surface input to command-line programs is \n"
298 " now done via -spec files too.\n"
299 " + One-way communication with SUMA via niml.\n"
300 " Only available with SurfSmooth for the moment.\n"
301 " + Began, in good faith, to update the new version \n"
302 " information.\n");
303 break;
304
305 default:
306 SS = SUMA_StringAppend_va(SS, "++ %d? No such version, fool!\n", ver);
307 break;
308 }
309
310 /* clean SS */
311 SS = SUMA_StringAppend (SS, NULL);
312 /* copy s pointer and free SS */
313 s = SS->s;
314 SUMA_free(SS);
315
316 SUMA_RETURN(s);
317 }
318
319 /*!
320 \brief function called when help window is open
321 */
SUMA_Help_open(void * p)322 void SUMA_Help_open (void *p)
323 {
324 static char FuncName[]={"SUMA_Help_open"};
325
326 SUMA_ENTRY;
327 /* nothing to do here */
328
329 SUMA_RETURNe;
330 }
331
332 /*!
333 \brief function called when help window is destroyed
334 */
SUMA_Help_destroyed(void * p)335 void SUMA_Help_destroyed (void *p)
336 {
337 static char FuncName[]={"SUMA_Help_destroyed"};
338
339 SUMA_ENTRY;
340
341 SUMAg_CF->X->Help_TextShell = NULL;
342
343 SUMA_RETURNe;
344 }
345 /*!
346 \brief function called when help window is open
347 */
SUMA_Help_Cmap_open(void * p)348 void SUMA_Help_Cmap_open (void *p)
349 {
350 static char FuncName[]={"SUMA_Help_Cmap_open"};
351
352 SUMA_ENTRY;
353 /* nothing to do here */
354
355 SUMA_RETURNe;
356 }
SUMA_Help_Plot_open(void * p)357 void SUMA_Help_Plot_open (void *p)
358 {
359 static char FuncName[]={"SUMA_Help_Plot_open"};
360
361 SUMA_ENTRY;
362 /* nothing to do here */
363
364 SUMA_RETURNe;
365 }
366
367 /*!
368 \brief function called when help window is destroyed
369 */
SUMA_Help_Cmap_destroyed(void * p)370 void SUMA_Help_Cmap_destroyed (void *p)
371 {
372 static char FuncName[]={"SUMA_Help_Cmap_destroyed"};
373
374 SUMA_ENTRY;
375
376 SUMAg_CF->X->Help_Cmap_TextShell = NULL;
377
378 SUMA_RETURNe;
379 }
380 /*!
381 \brief function called when help window is destroyed
382 */
SUMA_Help_Plot_destroyed(void * p)383 void SUMA_Help_Plot_destroyed (void *p)
384 {
385 static char FuncName[]={"SUMA_Help_Plot_destroyed"};
386
387 SUMA_ENTRY;
388
389 SUMAg_CF->X->Help_Plot_TextShell = NULL;
390
391 SUMA_RETURNe;
392 }
393
394 /*!
395 \brief function called when whereami window is destroyed
396 */
SUMA_Whereami_destroyed(void * p)397 void SUMA_Whereami_destroyed (void *p)
398 {
399 static char FuncName[]={"SUMA_Whereami_destroyed"};
400
401 SUMA_ENTRY;
402
403 SUMAg_CF->X->Whereami_TextShell = NULL;
404
405 SUMA_RETURNe;
406 }
407
408 /*!
409 \brief function called when whereami window is destroyed
410 */
SUMA_Whereami_open(void * p)411 void SUMA_Whereami_open (void *p)
412 {
413 static char FuncName[]={"SUMA_Whereami_open"};
414
415 SUMA_ENTRY;
416
417 SUMA_RETURNe;
418 }
419
420 /*!
421 \brief function called when Message window is open
422 */
SUMA_Message_open(void * p)423 void SUMA_Message_open (void *p)
424 {
425 static char FuncName[]={"SUMA_Message_open"};
426
427 SUMA_ENTRY;
428 /* nothing to do here */
429
430 SUMA_RETURNe;
431 }
432
433 /*!
434 \brief function called when Message window is destroyed
435 */
SUMA_Message_destroyed(void * p)436 void SUMA_Message_destroyed (void *p)
437 {
438 static char FuncName[]={"SUMA_Message_destroyed"};
439
440 SUMA_ENTRY;
441
442 SUMAg_CF->X->Log_TextShell = NULL;
443
444 SUMA_RETURNe;
445 }
446
SUMA_NIDO_Info(void)447 char * SUMA_NIDO_Info(void)
448 {
449 static char FuncName[]={"SUMA_NIDO_Info"};
450 char *s = NULL;
451 SUMA_STRING *SS = NULL;
452
453 SUMA_ENTRY;
454
455 SS = SUMA_StringAppend (NULL, NULL);
456
457 SS = SUMA_StringAppend(SS,
458 "Displayble objects in NIML format (NIDO).\n"
459 "A NIDO is a collection of displayable objects specified in an ascii file.\n"
460 "NIDO is a collection of elements with the first element named 'nido_head'\n"
461 "That first element can contain attributes that describe the entire NIDO \n"
462 "and default attributes for the remaining elements.\n"
463 "The following example shows a nido_head element with possible attributes.\n"
464 "You do not need to set them all if you don't care to do so. Note that all\n "
465 "attributes are strings and should be enclosed in single or double quotes.\n"
466 "\n"
467 "<nido_head\n"
468 "coord_type = 'fixed'\n"
469 "default_color = '1.0 0.2 0.6'\n"
470 "default_font = 'tr24'\n"
471 "bond = ''\n"
472 "render_mode = ''\n"
473 "/>\n"
474 "\n"
475 " coord_type attribute:\n"
476 " Describes the coordinate type of all elements in NIDO.\n"
477 " * If 'fixed' then that means then the elements do not move with\n"
478 " suma's surfaces, and the coordinate units are assumed to be in the\n"
479 " range [0,1] with '0 0 0' being the lower left corner of the screen\n"
480 " and closest to you. The z coordinate is useful for assigning elements\n"
481 " to either the background (1) or the foreground (0) of the scene. \n"
482 " Elements in the foreground would always be visible, while those in the\n"
483 " background may be obscured by the rendered surface.\n"
484 " * If 'mobile' then the elements will move along with your object.\n"
485 " In that case, the corrdinates you specify are in the same space \n"
486 " as your rendered objects. Also, with 'mobile' NIDO, you can specify\n"
487 " location by specifying a 'node' attribute as illustrated below.\n"
488 " * Default NIDO coordinate type is: 'mobile'\n"
489 " default_color atribute:\n"
490 " 3 (R G B) , or 4 (R G B A) color values between [0, 1]\n"
491 " Elements that do not have their own 'col' attribute set, will use \n"
492 " default_color instead. At the moment however, A is not being used.\n"
493 " Default default_color is '1.0 1.0 1.0'\n"
494 " default_font attribute:\n"
495 " String specifying font. All fonts are from the GLUT library. \n"
496 " Elements that do not have their own 'font' attribute set, will use \n"
497 " default_font instead.\n"
498 " Default default_font is 'f9'\n"
499 " Allowed fonts are:\n"
500 " 'f8', or 'font8': Constant width 8 size font\n"
501 " 'f9', or 'font9': Constant width 9 size font\n"
502 " 'tr10', or 'times_roman10'\n"
503 " 'tr24', or 'times_roman24'\n"
504 " 'he10', or 'helvetica10'\n"
505 " 'he12', or 'helvetica12'\n"
506 " 'he18', or 'helvetica18'\n"
507 " default_SO_label:\n"
508 " Label identifying surface from which elements get their node based \n"
509 " parameters extracted.\n"
510 " This is mostly useful when the coordinate system's type is 'mobile'\n"
511 " The default is the currently selected surface in SUMA. If no surface\n"
512 " is currently selected, some random surface is picked.\n"
513 " default_node:\n"
514 " One integer which specifies the index of the node to which all elements\n"
515 " belong. This value essentially specfies the 'node' attribute of\n"
516 " individual elements should the 'node' attribute be missing.\n"
517 " A missing default_node, or a value of -1 indicate there is no default\n"
518 " node.\n"
519 " bond:\n"
520 " If set to 'surface' then NIDO is attached to a particular surface.\n"
521 " This means that if a surface is not displayed, none of the elements in\n"
522 " this NIDO would be displayed. Default is 'none'\n"
523 " render_mode:\n"
524 " Used to force rendering mode of NIDO elements to a certain value.\n"
525 " Choose from: Viewer, Fill, Line, Points, Hide, Default or '' \n"
526 " Default is '' with rendering mode unmodified before rendering NIDO.\n"
527 "\n"
528 "After 'nido_head' comes a list of elements of various types.\n"
529 "Text element example:\n"
530 "<T\n"
531 "font = 'he12'\n"
532 "coord = '0.5 0.5 0'\n"
533 "col = '0.21 0.9 0.61'\n"
534 "text = "
535 "'The Middle\n"
536 "----------'\n"
537 "h_align = 'center'\n"
538 "v_align = 'center'\n"
539 "/>\n"
540 " text attribute:\n"
541 " Put the text you want to display between single or double quotes.\n"
542 " You can do multi-line text.\n"
543 " coord attribute:\n"
544 " XYZ coordinates whose units are determined by nido_head's coord_type.\n"
545 " See also p attribute\n"
546 " p attribute:\n"
547 " A convenience positioning attribute for placing text in fixed screen\n"
548 " coordinates. If present, it will override coord, h_align, and v_align\n"
549 " attributes. Its value is two to 3 characters long.\n"
550 " 1st char: t for top, c for center or m for middle, b for bottom\n"
551 " 2nd char: l for left, c for center or m for middle, r for right\n"
552 " 3rd char: f for front, r for rear (optional)\n"
553 " h_align and v_align are set in a manner that makes sense for these \n"
554 " special position flags.\n"
555 " font attribute:\n"
556 " Sets the font for the text element. If not specified, font is set per \n"
557 " default_font.\n"
558 " col attribute:\n"
559 " Sets the color for the text element. If not specified, col is set per \n"
560 " default_color.\n"
561 " h_align:\n"
562 " Sets the horizontal alignment. Choose from 'l' (default) for left,\n"
563 " 'c' for center, or 'r' for right.\n"
564 " v_align:\n"
565 " Sets the horizontal alignment. Choose from 'b' (default) for bottom, \n"
566 " 'c' for center, or 't' for top.\n"
567 " node:\n"
568 " Places the object at a node's location in the surface object defined by\n"
569 " SO_label attribute. Note that this option overrides coord and might \n"
570 " confuse you if NIDO's coord_type is 'fixed'. In such a case, the \n"
571 " location would be that of the node, before you moved the surface.\n"
572 " SO_label:\n"
573 " Label of Surface Object from which the element gets its node based\n"
574 " parameters extracted. Default is NIDO's default_SO_label\n"
575 "Sphere element example (only new attributes are detailed):\n"
576 "<S\n"
577 "node = '0'\n"
578 "col = '0.9 0.1 0.61'\n"
579 "rad = '35'\n"
580 "line_width = '1.5'\n"
581 "style = 'silhouette'\n"
582 "stacks = '20'\n"
583 "slices = '20'\n"
584 "/>\n"
585 " rad attribute:\n"
586 " Radius of the sphere (default 10).\n"
587 " rad.ef attribute:\n"
588 " In lieu of rad, this parameter would\n"
589 " make the radius be a fraction of the average edge length\n"
590 " for the surface related to this sphere.\n"
591 " line_width attribute:\n"
592 " Width of line (segments) of sphere's mesh\n"
593 " stacks attribute:\n"
594 " Number of longitudes (default 10).\n"
595 " slices attribute:\n"
596 " Number of lattitudes (default 10).\n"
597 " style attribute:\n"
598 " Style of sphere rendering. Choose from:\n"
599 " fill (default), line, silhouette, or point\n"
600 " See OpenGL's gluQuadricStyle function for details.\n"
601 " Other acceptable attributes:\n"
602 " node, coord, and SO_label\n"
603 "Image element example (only new attributes are detailed):\n"
604 "<I\n"
605 "coord = '0.4 0.5 1'\n"
606 "filename = 'face_alexmartin2.jpg'\n"
607 "h_align = 'center'\n"
608 "v_align = 'bot'\n"
609 "/>\n"
610 " filename attribute:\n"
611 " Specifies the filename of the image. If the filename has no path, SUMA\n"
612 " will search your path for a match before failing.\n"
613 " Other acceptable attributes:\n"
614 " h_align, v_align, coord, node, and SO_label.\n"
615 "\n"
616 "Texture element example:\n"
617 "<Tex\n"
618 "filename = 'face_afniman.jpg'\n"
619 "target = 'FRAME'\n"
620 "frame_coords = '\n"
621 "0.0 0.0 1\n"
622 "0.0 1.0 1\n"
623 "1.0 1.0 1\n"
624 "1.0 0.0 1 '\n"
625 "mix_mode = 'blend'\n"
626 "coord_gen = 'sphere'\n"
627 "/>\n"
628 " filename attribute:\n"
629 " Specifies the filename of the texture image.\n"
630 " target attribute:\n"
631 " Specifies the target of the texture. \n"
632 " If target is 'FRAME' then the texture is bound to a quadrilateral whose\n"
633 " coordinates are defined by the frame_coords attribute. This is useful\n"
634 " for putting a background image in SUMA for example, when NIDO is of\n"
635 " a 'fixed' coord_type. Alternately, target can be the label of a \n"
636 " surface, or a bunch of surfaces sharing the label string.\n"
637 " The default is 'ALL_SURFS' which targets all surfaces being displayed\n"
638 " frame_coords attribute:\n"
639 " Specify the coordinate of the quadrilateral onto which the texture\n"
640 " is bound. This is of use when target is set to 'FRAME'. The default\n"
641 " coordinates are set to:\n"
642 " 0.0 0.0 1\n"
643 " 0.0 1.0 1\n"
644 " 1.0 1.0 1\n"
645 " 1.0 0.0 1 '\n"
646 " For 'fixed' coord_type, this defaut sets up a rectangle that fills up \n"
647 " the suma viewer in the background of the scene. \n"
648 " BUG: If you reduce z in 'fixed' coord_type, the texture map be\n"
649 " positioned closer to the foreground, and should obscure objects behind \n"
650 " it. But for some reason, no surfaces get rendered in that case, no \n"
651 " matter where they lie relative to the texture frame.\n"
652 " For 'mobile' coord_type, the texture frame coordinates are in the same\n"
653 " units as those for the rendered objects. \n"
654 " Showing textures in frames is like displaying an image except that:\n"
655 " - Textures will scale with changes in viewer size for 'fixed' coord_type\n"
656 " and zoom factor for 'mobile' coord_type. While image size only depends\n"
657 " on its number of pixels. \n"
658 " - Frame orientation is arbitrary for textures. For images, the frame is\n"
659 " always aligned with the pixel arrays (always facing you). With images, \n"
660 " you can only control where its center is located.\n"
661 " mix_mode attribute:\n"
662 " Specifies the way texture mixes with node colors.\n"
663 " Choose from: 'decal', 'blend', 'replace', and 'modulate'. \n"
664 " Default is 'replace' when target is 'frame' and 'modulate' for \n"
665 " other target values. These parallel OpenGL's GL_DECAL, GL_BLEND, etc.\n"
666 " coord_gen attribute:\n"
667 " Specifies how texture coordinate generation is done, when target is not\n"
668 " 'FRAME'. Choose from: 'sphere', 'object', 'eye'. Default is 'sphere'\n"
669 " For detail, see OpenGL's GL_SPHERE_MAP, GL_OBJECT_LINEAR, etc.\n"
670 "\n");
671 if (SUMAg_CF->Dev) {
672 SS = SUMA_StringAppend(SS,
673 "3DTexture element example:\n"
674 "<3DTex\n"
675 "filename = 'cube256+tlrc.BRIK'\n"
676 "/>\n"
677 " filename attribute:\n"
678 " Specifies the filename of the 3D Texture (volume) image.\n"
679 " This image is anything that AFNI can read as a dataset.\n"
680 " For the moment, it is only tested on single brick dsets.\n"
681 " For testing, try the following from ~/Work/VolumeRender:\n"
682 " suma -i surf.ply -niml -dev & ; \\\n"
683 " sleep 3 && \\\n"
684 " DriveSuma -com viewer_cont -load_do mobile.niml.do ; \\\n"
685 " set l = $< ; DriveSuma -com kill_suma\n"
686 "\n");
687 }
688 SS = SUMA_StringAppend(SS,
689 " Try the script :ref:`@DO.examples<@DO.examples>` for concrete examples on \n"
690 " displayable objects.\n"
691 "\n"
692 );
693
694 SUMA_SS2S(SS,s);
695
696 SUMA_RETURN (s);
697
698 }
699
SUMA_OptList_string(HELP_OPT * hol)700 char * SUMA_OptList_string(HELP_OPT *hol)
701 {
702 static char FuncName[]={"SUMA_OptList_string"};
703 char *s = NULL;
704 int i=0;
705 SUMA_STRING *SS = NULL;
706
707 SUMA_ENTRY;
708
709 SS = SUMA_StringAppend (NULL, NULL);
710 while (hol[i].name) {
711 SS = SUMA_StringAppend_va(SS," %s\n", hol[i].help);
712 if (hol[i].val)
713 SS = SUMA_StringAppend_va(SS," default: %s\n", hol[i].val);
714 ++i;
715 }
716
717 SUMA_SS2S(SS,s);
718
719 SUMA_RETURN (s);
720 }
721
SUMA_OptList_get(HELP_OPT * hol,char * opname,char * what)722 char *SUMA_OptList_get(HELP_OPT *hol, char *opname, char *what)
723 {
724 static char FuncName[]={"SUMA_OptList_default"};
725 int i = 0;
726
727 SUMA_ENTRY;
728
729 while (hol[i].name) {
730 if (!strcasecmp(hol[i].name, opname)) {
731 if (what[0] == 'd' || what[0] == 'D') {
732 SUMA_RETURN(hol[i].val);
733 } else if (what[0] == 'v' || what[0] == 'V') {
734 SUMA_RETURN(hol[i].val);
735 } else if (what[0] == 'h' || what[0] == 'H') {
736 SUMA_RETURN(hol[i].help);
737 } else {
738 SUMA_RETURN(NULL);
739 }
740 }
741 ++i;
742 }
743 SUMA_RETURN(NULL);
744 }
745
SUMA_sources_Info(void)746 char * SUMA_sources_Info(void)
747 {
748 static char FuncName[]={"SUMA_sources_Info"};
749 char *s = NULL;
750 SUMA_STRING *SS = NULL;
751
752 SUMA_ENTRY;
753
754 SS = SUMA_StringAppend (NULL, NULL);
755
756 SS = SUMA_StringAppend(SS,
757 "Parts of SUMA use functions from various sources.\n"
758 "Library sources:\n"
759 "----------------\n"
760 "* Openmotif\n"
761 " --------------------------------------------------------------\n"
762 "\n"
763 "The enhancements made by Integrated Computer Solutions, Inc. (ICS) to\n"
764 "create Open Motif 2.2.2, Open Motif 2.2.3, Open Motif 2.2.4 and\n"
765 "Open Motif 2.3.0 are made available under The Open Group Public\n"
766 "License that is included below.\n"
767 "\n"
768 " --------------------------------------------------------------\n"
769 "\n"
770 "$TOG: COPYRIGHT.MOTIF /main/5 2000/04/10 12:00:00 $\n"
771 "\n"
772 " MOTIF 2.1.30\n"
773 " Source Code\n"
774 " MASTER COPYRIGHT NOTICE\n"
775 "\n"
776 "(c) Copyright 1989 - 1994, 1996 - 1999 The Open Group\n"
777 "(c) Copyright 1987 - 1999 Hewlett-Packard Company\n"
778 "(c) Copyright 1987 - 1999 Digital Equipment Corporation, Maynard, Mass.\n"
779 "(c) Copyright 1988 Massachusetts Institute of Technology\n"
780 "(c) Copyright 1988 Microsoft Corporation\n"
781 "(c) Copyright 1990 Motorola Inc.\n"
782 "(c) Copyright 1989 - 1994 Groupe Bull\n"
783 "(c) Copyright 1991 Joseph Friedman\n"
784 "(c) Copyright 1995 - 1999 International Business Machines Corp.\n"
785 "(c) Copyright 1995 - 1999 Sun Microsystems, Inc.\n"
786 "(c) Copyright 1995 - 1999 Santa Cruz Organization, Inc.\n"
787 "(c) Copyright 1995, 1996 Fujitsu Limited\n"
788 "(c) Copyright 1995, 1996 Hitachi, Ltd.\n"
789 "\n"
790 "\n"
791 "ALL RIGHTS RESERVED\n"
792 "\n"
793 "This software is furnished under a license and may be used\n"
794 "and copied only in accordance with the terms of such license and\n"
795 "with the inclusion of this copyright notice. No title to and ownership\n"
796 "of the software is hereby transferred.\n"
797 "\n"
798 "This software is subject to an open license. It may only be\n"
799 "used on, with or for operating systems which are themselves open\n"
800 "source systems. You must contact The Open Group for a license allowing\n"
801 "distribution and sublicensing of this software on, with, or for\n"
802 "operating systems which are not Open Source programs.\n"
803 "\n"
804 "See http://www.opengroup.org/openmotif/license for full\n"
805 "details of the license agreement. Any use, reproduction, or\n"
806 "distribution of the program constitutes recipient's acceptance of\n"
807 "this agreement.\n"
808 "\n"
809 "THE OPEN GROUP AND ITS THIRD PARTY SUPPLIERS, ASSUME NO RESPONSIBILITY\n"
810 "FOR THE USE OR INABILITY TO USE ANY OF ITS SOFTWARE.\n"
811 "\n"
812 "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS\n"
813 "PROVIDED ON AN \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n"
814 "KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY\n"
815 "WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY\n"
816 "OR FITNESS FOR A PARTICULAR PURPOSE.\n"
817 "\n"
818 "EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT\n"
819 "NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT,\n"
820 "INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n"
821 "DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED\n"
822 "AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n"
823 "LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n"
824 "ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE\n"
825 "EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE\n"
826 "POSSIBILITY OF SUCH DAMAGES.\n"
827 "\n"
828 "The information in this software is subject to change without\n"
829 "notice and should not be construed as a commitment by The Open Group\n"
830 "or its third party suppliers.\n"
831 "\n"
832 "Notice: Notwithstanding any other lease or license that may pertain to,\n"
833 "or accompany the delivery of, this computer software, the rights of the\n"
834 "Government regarding its use, reproduction and disclosure are as set\n"
835 "forth in Section 52.227-19 of the FARS Computer Software-Restricted\n"
836 "Rights clause.\n"
837 "\n"
838 "(c) Copyright 1990, 1991, 1992, 1993, 1994, 1996 Open Software\n"
839 "Foundation, Inc.\n"
840 "(c) Copyright 1996, 1997, 1998, 1999, 2000 The Open Group.\n"
841 "Unpublished - all rights reserved under the Copyright laws of the United\n"
842 "States.\n"
843 "\n"
844 "RESTRICTED RIGHTS NOTICE: Use, duplication, or disclosure by the\n"
845 "Government is subject to the restrictions as set forth in subparagraph\n"
846 "(c)(1)(ii) of the Rights in Technical Data and Computer Software clause\n"
847 "at DFARS 52.227-7013.\n"
848 "\n"
849 "The Open Group LLC\n"
850 "Apex Plaza, Forbury Road\n"
851 "Reading, Berkshire,\n"
852 "RG1 1AX, UK.\n"
853 "\n"
854 "RESTRICTED RIGHTS LEGEND: This computer software is submitted with\n"
855 "\"restricted rights.\" Use, duplication or disclosure is subject to the\n"
856 "restrictions as set forth in NASA FAR SUP 18-52.227-79 (April 1985)\n"
857 "\"Commercial Computer Software- Restricted Rights (April 1985).\" The\n"
858 "Open Group, Apex Plaza, Forbury Road, Reading, Berkshire, RG1 1AX, UK.\n"
859 "If the contract contains the Clause at 18-52.227-74 \"Rights in Data\n"
860 "General\" then the \"Alternate III\" clause applies.\n"
861 "\n"
862 "(c) Copyright 1990, 1991, 1992, 1993, 1994, 1996 Open Software\n"
863 "Foundation,Inc. ALL RIGHTS RESERVED\n"
864 "(c) Copyright 1996, 1997, 1998, 1999, 2000 The Open Group. ALL RIGHTS\n"
865 "RESERVED\n"
866 "\n"
867 "The Open Group, Open Software Foundation, OSF, OSF/Motif, and Motif are\n"
868 "Trademarks of The Open Group\n"
869 "DEC and DIGITAL are registered trademarks of Digital Equipment\n"
870 "Corporation\n"
871 "HP is a trademark of Hewlett-Packard Company\n"
872 "X Window System is a trademark of the Massachusetts Institute of\n"
873 "Technology\n"
874 "\n"
875 "* MarchingCubes:\n"
876 " The code for the heart of the program IsoSurface is a translation of:\n"
877 " Thomas Lewiner's C++ implementation of the algorithm in:\n"
878 " Efficient Implementation of Marching Cubes´ Cases with Topological Guarantees\n"
879 " by Thomas Lewiner, Helio Lopes, Antonio Wilson Vieira and Geovan Tavares \n"
880 " in Journal of Graphics Tools. \n"
881 " http://www-sop.inria.fr/prisme/personnel/Thomas.Lewiner/JGT.pdf\n"
882 " Permission to use this translation in other programs must be obtained \n"
883 " from Mr. Lewiner.\n"
884 "\n"
885 "* 3d Edge Detection:\n"
886 " The code for 3dEdge detection is from the library 3DEdge \n"
887 " by Gregoire Malandain (gregoire.malandain@sophia.inria.fr)\n"
888 " References for the algorithms:\n"
889 " - Optimal edge detection using recursive filtering\n"
890 " R. Deriche, International Journal of Computer Vision,\n"
891 " pp 167-187, 1987.\n"
892 " - Recursive filtering and edge tracking: two primary tools\n"
893 " for 3-D edge detection, O. Monga, R. Deriche, G. Malandain\n"
894 " and J.-P. Cocquerez, Image and Vision Computing 4:9, \n"
895 " pp 203-214, August 1991.\n"
896 "\n"
897 "* QHull:\n"
898 " Qhull, Copyright (c) 1993-2001 \n"
899 " The National Science and Technology Research Center for \n"
900 " Computation and Visualization of Geometric Structures \n"
901 " (The Geometry Center) \n"
902 " University of Minnesota \n"
903 " 400 Lind Hall \n"
904 " 207 Church Street S.E. \n"
905 " Minneapolis, MN 55455 USA \n"
906 " \n"
907 " email: qhull@geom.umn.edu \n"
908 " \n"
909 " This software includes Qhull from The Geometry Center. Qhull is \n"
910 " copyrighted as noted above. Qhull is free software and may be obtained \n"
911 " via anonymous ftp from geom.umn.edu. It may be freely copied, modified, \n"
912 " and redistributed under the following conditions: \n"
913 " \n"
914 " 1. All copyright notices must remain intact in all files. \n"
915 " \n"
916 " 2. A copy of this text file must be distributed along with any copies \n"
917 " of Qhull that you redistribute; this includes copies that you have \n"
918 " modified, or copies of programs or other software products that \n"
919 " include Qhull. \n"
920 " \n"
921 " 3. If you modify Qhull, you must include a notice giving the \n"
922 " name of the person performing the modification, the date of \n"
923 " modification, and the reason for such modification. \n"
924 " \n"
925 " 4. When distributing modified versions of Qhull, or other software \n"
926 " products that include Qhull, you must provide notice that the original \n"
927 " source code may be obtained as noted above.\n"
928 " \n"
929 " 5. There is no warranty or other guarantee of fitness for Qhull, it is \n"
930 " provided solely ""as is"". Bug reports or fixes may be sent to \n"
931 " qhull_bug@geom.umn.edu; the authors may or may not act on them as \n"
932 " they desire.\n"
933 " \n"
934 "\n"
935 "* GLUT: Mark. J. Kilgard's code from the book 'Programming OpenGL for \n"
936 " the X Window System' (ISBN:0-201-48359-9) published by \n"
937 " Addison-Wesley.\n"
938 " NOTICE: This source code distribution contains source code contained\n"
939 " in the book 'Programming OpenGL for the X Window System' (ISBN:\n"
940 " 0-201-48359-9) published by Addison-Wesley. The programs and\n"
941 " associated files contained in the distribution were developed by Mark\n"
942 " J. Kilgard and are Copyright 1994, 1995, 1996 by Mark J. Kilgard\n"
943 " (unless otherwise noted). The programs are not in the public domain,\n"
944 " but they are freely distributable without licensing fees. These\n"
945 " programs are provided without guarantee or warrantee expressed or\n"
946 " implied.\n"
947 "\n"
948 "* PLY: A set of functions for reading/writing PLY polygon files by\n"
949 " Greg Turk.\n"
950 " Copyright (c) 1994 The Board of Trustees of The Leland Stanford\n"
951 " Junior University. All rights reserved. \n"
952 " \n"
953 " Permission to use, copy, modify and distribute this software and its \n"
954 " documentation for any purpose is hereby granted without fee, provided \n"
955 " that the above copyright notice and this permission notice appear in \n"
956 " all copies of this software and that you do not sell the software. \n"
957 " \n"
958 " THE SOFTWARE IS PROVIDED 'AS IS' AND WITHOUT WARRANTY OF ANY KIND, \n"
959 " EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY \n"
960 " WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. \n"
961 " \n"
962 "* SimpEnvelopes: A set of functions for simplifying triangular meshes by\n"
963 " Jonathan Cohen (cohenj@cs.unc.edu) and Amitabh Varshney\n"
964 " (varshney@cs.sunysb.edu).\n"
965 " Copyright 1995 The University of North Carolina at Chapel Hill.\n"
966 " All Rights Reserved.\n"
967 "\n"
968 " Permission to use, copy, modify and distribute this software and its\n"
969 " documentation for educational, research and non-profit purposes,\n"
970 " without fee, and without a written agreement is hereby granted,\n"
971 " provided that the above copyright notice and the following three\n"
972 " paragraphs appear in all copies.\n"
973 "\n"
974 " IN NO EVENT SHALL THE UNIVERSITY OF NORTH CAROLINA AT CHAPEL HILL BE\n"
975 " LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR\n"
976 " CONSEQUENTIAL DAMAGES, INCLUDING LOST PROFITS, ARISING OUT OF THE\n"
977 " USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY\n"
978 " OF NORTH CAROLINA HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH\n"
979 " DAMAGES.\n"
980 "\n"
981 "\n"
982 " Permission to use, copy, modify and distribute this software and its\n"
983 " documentation for educational, research and non-profit purposes,\n"
984 " without fee, and without a written agreement is hereby granted,\n"
985 " provided that the above copyright notice and the following three\n"
986 " paragraphs appear in all copies.\n"
987 "\n"
988 " THE UNIVERSITY OF NORTH CAROLINA SPECIFICALLY DISCLAIM ANY\n"
989 " WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\n"
990 " MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE\n"
991 " PROVIDED HEREUNDER IS ON AN 'AS IS' BASIS, AND THE UNIVERSITY OF\n"
992 " NORTH CAROLINA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT,\n"
993 " UPDATES, ENHANCEMENTS, OR MODIFICATIONS.\n"
994 "\n"
995 " The authors may be contacted via:\n"
996 "\n"
997 " US Mail: Jonathan Cohen Amitabh Varshney\n"
998 " Department of Computer Science Department of Computer Science \n"
999 " Sitterson Hall, CB #3175 State University of New York\n"
1000 " University of N. Carolina Stony Brook, NY 11794-4400, USA \n"
1001 " Chapel Hill, NC 27599-3175\n"
1002 " \n"
1003 " Phone: (919)962-1749 Phone: (516)632-8446 \n"
1004 " \n"
1005 " EMail: cohenj@cs.unc.edu varshney@cs.sunysb.edu\n"
1006 "\n"
1007 "* UTHASH:\n"
1008 "Copyright (c) 2005-2009, Troy D. Hanson http://uthash.sourceforge.net\n"
1009 "All rights reserved.\n"
1010 "\n"
1011 "Redistribution and use in source and binary forms, with or without\n"
1012 "modification, are permitted provided that the following conditions are met:\n"
1013 "\n"
1014 " * Redistributions of source code must retain the above copyright\n"
1015 " notice, this list of conditions and the following disclaimer.\n"
1016 "\n"
1017 "THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS\n"
1018 "IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED\n"
1019 "TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A\n"
1020 "PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER\n"
1021 "OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n"
1022 "EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n"
1023 "PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR\n"
1024 "PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF\n"
1025 "LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\n"
1026 "NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n"
1027 "SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n"
1028 "\n"
1029 "Sample code sources:\n"
1030 "--------------------\n"
1031 "* 'Mastering Algorithms with C': a book by Kyle Loudon, \n"
1032 " published by O'Reilly & Associates. \n"
1033 " This code is under copyright and cannot be included in any other book, publication,\n"
1034 " or educational product without permission from O'Reilly & Associates. No\n"
1035 " warranty is attached; we cannot take responsibility for errors or fitness for\n"
1036 " use.\n"
1037 "\n"
1038 "* 'C Language Algorithms for Digital Signal Processing': a book by \n"
1039 " Bruce Kimball, Paul Embree and Bruce Kimble\n"
1040 " published by Prentice Hall, 1991.\n"
1041 "\n"
1042 "* 'Motif Programming Manual': a book by Dan Heller and Paula Ferguson\n"
1043 " published by O'Reilly & Associates, Inc. 1994\n"
1044 " * Written by Dan Heller and Paula Ferguson.\n"
1045 " * Copyright 1994, O'Reilly & Associates, Inc.\n"
1046 " * Permission to use, copy, and modify this program without\n"
1047 " * restriction is hereby granted, as long as this copyright\n"
1048 " * notice appears in each copy of the program source code.\n"
1049 " * This program is freely distributable without licensing fees and\n"
1050 " * is provided without guarantee or warrantee expressed or implied.\n"
1051 " * This program is -not- in the public domain.\n"
1052 "\n"
1053 "* 'http://astronomy.swin.edu.au/~pbourke': Paul Bourke's personal pages\n"
1054 " on geometry and rendering .\n"
1055 " Copyright notice on webpage: Copyright Paul Bourke or a third party \n"
1056 " contributer where indicated. You may view this site and its contents \n"
1057 " using your web browser. You may print or save an electronic copy of \n"
1058 " parts of this web site for your own personal use. \n"
1059 " Permission must be sought for any other use. \n"
1060 "\n"
1061 " The C clustering library.\n"
1062 " Copyright (C) 2002 Michiel Jan Laurens de Hoon.\n"
1063 " \n"
1064 " This library was written at the Laboratory of DNA Information Analysis,\n"
1065 " Human Genome Center, Institute of Medical Science, University of Tokyo,\n"
1066 " 4-6-1 Shirokanedai, Minato-ku, Tokyo 108-8639, Japan.\n"
1067 " Contact: mdehoon 'AT' gsc.riken.jp\n"
1068 " \n"
1069 " Permission to use, copy, modify, and distribute this software and its\n"
1070 " documentation with or without modifications and for any purpose and\n"
1071 " without fee is hereby granted, provided that any copyright notices\n"
1072 " appear in all copies and that both those copyright notices and this\n"
1073 " permission notice appear in supporting documentation, and that the\n"
1074 " names of the contributors or copyright holders not be used in\n"
1075 " advertising or publicity pertaining to distribution of the software\n"
1076 " without specific prior permission.\n"
1077 " \n"
1078 " THE CONTRIBUTORS AND COPYRIGHT HOLDERS OF THIS SOFTWARE DISCLAIM ALL\n"
1079 " WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED\n"
1080 " WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL THE\n"
1081 " CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT\n"
1082 " OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS\n"
1083 " OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE\n"
1084 " OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE\n"
1085 " OR PERFORMANCE OF THIS SOFTWARE.\n"
1086 " \n"
1087 );
1088
1089 SUMA_SS2S(SS,s);
1090
1091 SUMA_RETURN (s);
1092 }
1093
SUMA_help_Cmap_message_Info(SUMA_COLOR_MAP * ColMap,TFORM targ)1094 char * SUMA_help_Cmap_message_Info(SUMA_COLOR_MAP * ColMap, TFORM targ)
1095 {
1096 static char FuncName[]={"SUMA_help_Cmap_message_Info"};
1097 char stmp[1000], *s = NULL;
1098 SUMA_STRING *SS = NULL;
1099
1100 SUMA_ENTRY;
1101
1102 if (targ != TXT && targ != SPX) targ = TXT;
1103
1104 SS = SUMA_StringAppend (NULL, NULL);
1105
1106 if (targ == TXT) {
1107 SS = SUMA_StringAppend (SS,
1108 "\nColormap Keyboard Controls:\n");
1109 } else if (targ == SPX) {
1110 SS = SUMA_StringAppend (SS,
1111 ".. _Colormap_Keyboard_Controls:\n\n"
1112 "Colormap Keyboard Controls\n"
1113 "--------------------------\n\n");
1114 }
1115 #if 0
1116 s = SUMA_New_Additions (0, 1);
1117 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
1118 #endif
1119
1120 SS = SUMA_StringAppend_va (SS,
1121 "With the cursor over the colormap, the following keyboard initiated actions\n"
1122 "are available.\n\n"
1123 " %s: flip color map\n"
1124 " See also Up/Down keys.\n"
1125 "\n", SUMA_hkcf("f", targ));
1126
1127 SS = SUMA_StringAppend_va (SS,
1128 " %s: this help message\n"
1129 "\n", SUMA_hkcf("Ctrl+h", targ));
1130
1131 SS = SUMA_StringAppend_va (SS,
1132 " %s: record image of colormap.\n"
1133 "\n", SUMA_hkcf("r", targ));
1134
1135 SS = SUMA_StringAppend_va (SS,
1136 " %s: write colormap to ascii file.\n"
1137 "\n", SUMA_hkcf("w", targ));
1138
1139 SS = SUMA_StringAppend_va (SS,
1140 " %s: Zoom in.\n"
1141 " Maximum zoom in shows 2 colors in the map\n"
1142 " %s: Zoom out.\n"
1143 " Minimum zoom in shows all colors in the map\n"
1144 "\n", SUMA_hkcf("Z", targ), SUMA_hkcf("z", targ));
1145
1146 SS = SUMA_StringAppend_va (SS,
1147 " %s arrows: rotate colormap up/down by fraction of\n"
1148 " number of colors in color map. Fraction\n"
1149 " a number between 0 and 0.5 and set via\n"
1150 " the environment variable\n"
1151 " SUMA_ColorMapRotationFraction.\n"
1152 " See suma -environment for complete list\n"
1153 " of variables.\n\n",
1154 SUMA_hkcf("U-D arrows", targ));
1155
1156 SS = SUMA_StringAppend_va (SS,
1157 " %s: rotate colormap up/down by one color\n"
1158 " %s: move colormap up/down\n"
1159 "\n", SUMA_hkcf("Ctrl+U-D arrows", targ), SUMA_hkcf("Shift+U-D arrows", targ));
1160
1161 SS = SUMA_StringAppend_va (SS,
1162 " %s: Reset zoom, translation and rotation parameters\n"
1163 "\n" , SUMA_hkcf("HOME", targ));
1164
1165 if (ColMap) {
1166 SS = SUMA_StringAppend (SS,
1167 "\nCmap properties\n");
1168 s = SUMA_ColorMapVec_Info(&ColMap, 1, 1);
1169 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
1170
1171 /* Add help for all controller options */
1172 s = SUMA_Help_AllSurfCont(targ);
1173 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
1174 }
1175 /* clean SS */
1176 SS = SUMA_StringAppend (SS, NULL);
1177 /* copy s pointer and free SS */
1178 s = SS->s;
1179 SUMA_free(SS);
1180
1181 SUMA_RETURN (SUMA_Sphinx_String_Edit(&s, targ, 0));
1182
1183 }
1184
SUMA_help_SPEC_symbolic(void)1185 char *SUMA_help_SPEC_symbolic(void)
1186 {
1187 static char FuncName[]={"SUMA_help_SPEC_symbolic"};
1188 char stmp[1000], *s = NULL;
1189 SUMA_STRING *SS = NULL;
1190
1191 SUMA_ENTRY;
1192
1193 SS = SUMA_StringAppend (NULL, NULL);
1194
1195
1196 SS = SUMA_StringAppend_va (SS,
1197 " As with option -i, you can load template\n"
1198 " spec files with symbolic notation trickery as in:\n"
1199 " suma -spec MNI_N27 \n"
1200 " which will load the all the surfaces from template MNI_N27\n"
1201 " at the original FreeSurfer mesh density.\n"
1202 " The string following -spec is formatted in the following manner:\n"
1203 " HEMI:TEMPLATE:DENSITY where:\n"
1204 " HEMI specifies a hemisphere. Choose from 'l', 'r', 'lh', 'rh', 'lr', or\n"
1205 " 'both' which is the default if you do not specify a hemisphere.\n"
1206 " TEMPLATE: Specify the template name. For now, choose from MNI_N27 if\n"
1207 " you want surfaces from the MNI_N27 volume, or TT_N27\n"
1208 " for the Talairach version.\n"
1209 " Those templates must be installed under this directory:\n"
1210 " %s\n"
1211 " If you have no surface templates there, download one of:\n"
1212 " https://afni.nimh.nih.gov/pub/dist/tgz/suma_MNI_N27.tgz\n"
1213 " https://afni.nimh.nih.gov/pub/dist/tgz/suma_TT_N27.tgz\n"
1214 " https://afni.nimh.nih.gov/pub/dist/tgz/suma_MNI152_2009.tgz\n"
1215 " and untar them under directory %s\n"
1216 " DENSITY: Use if you want to load standard-mesh versions of the template\n"
1217 " surfaces. Note that only ld20, ld60, ld120, and ld141 are in\n"
1218 " the current distributed templates. You can create other \n"
1219 " densities if you wish with MapIcosahedron, but follow the\n"
1220 " same naming convention to enable SUMA to find them.\n"
1221 " This parameter is optional.\n"
1222 " The order in which you specify HEMI, TEMPLATE, and DENSITY, does\n"
1223 " not matter.\n"
1224 " For template surfaces, the -sv option is provided automatically, so you\n"
1225 " can have SUMA talking to AFNI with something like:\n"
1226 " suma -spec MNI_N27:ld60 &\n"
1227 " afni -niml %s/suma_MNI_N27 \n"
1228 , THD_datadir(1), THD_datadir(1), THD_datadir(0)
1229 );
1230
1231 SS = SUMA_StringAppend (SS, NULL);
1232 s = SS->s;
1233 SUMA_free(SS);
1234
1235 SUMA_RETURN (s);
1236 }
1237
1238 static char PlotCommonHelp[]={
1239 " Open a graphing window for the dataset\n"
1240 " currently selected. The graphing window\n"
1241 " updates with each new node selection.\n"
1242 " A graphing window can be opened for each\n"
1243 " dataset, and all graphs will update unless\n"
1244 " '1 Only' is set in Surface Controller.\n"
1245 " For complex data its magnitude is plotted instead.\n"
1246 " Use 'ctrl+h' in graph window for more help.\n" };
1247
SUMA_help_Plot_message_Info(void)1248 char * SUMA_help_Plot_message_Info(void)
1249 {
1250 static char FuncName[]={"SUMA_help_Plot_message_Info"};
1251 char stmp[1000], *s = NULL;
1252 SUMA_STRING *SS = NULL;
1253
1254 SUMA_ENTRY;
1255
1256 SS = SUMA_StringAppend (NULL, NULL);
1257
1258
1259 SS = SUMA_StringAppend_va (SS,
1260 "What's in it for me?\n"
1261 "%s"
1262 "\nButtons:\n"
1263 " Save: Write graph image to file\n"
1264 " Freeze: Detach graph from SUMA.\n"
1265 " Further clicks will not update\n"
1266 " graph.\n"
1267 " Done: Close graph forever.\n"
1268 "\nKeyboard Controls\n"
1269 " Ctrl+h: this help message\n"
1270 "\n"
1271 " q/Q: Quit\n"
1272 " w: Write time series to 1D file.\n"
1273 "\n"
1274 "\n", PlotCommonHelp);
1275
1276 /* clean SS */
1277 SS = SUMA_StringAppend (SS, NULL);
1278 /* copy s pointer and free SS */
1279 s = SS->s;
1280 SUMA_free(SS);
1281
1282 SUMA_RETURN (s);
1283
1284 }
1285
1286
SUMA_help_message_Info(TFORM targ)1287 char * SUMA_help_message_Info(TFORM targ)
1288 {
1289 static char FuncName[]={"SUMA_help_message_Info"};
1290 char stmp[1000], *s = NULL;
1291 SUMA_STRING *SS = NULL;
1292 SUMA_Boolean LocalHead = NOPE;
1293
1294 SUMA_ENTRY;
1295
1296 if (targ != TXT && targ != SPX) targ = TXT;
1297
1298 SS = SUMA_StringAppend (NULL, NULL);
1299
1300 #if 0 /* not maintained any more */
1301 s = SUMA_New_Additions (0, 1);
1302 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
1303 #endif
1304 if (targ == TXT) {
1305 SS = SUMA_StringAppend (SS,
1306 "Keyboard Controls:\n");
1307 } else if (targ == SPX) {
1308 SS = SUMA_StringAppend (SS,
1309 ".. _KeyboardControls:\n\n"
1310 "Keyboard Controls\n"
1311 "-----------------\n\n");
1312 }
1313 SS = SUMA_StringAppend (SS,
1314 "*On MACs*, Alt is the Apple/Command key.\n"
1315 " If it is commandeered by the OS, and you can't get it back, then\n"
1316 " try the alt/option key instead.\n\n"
1317 "*On Linux*, Turn NumLock OFF, otherwise certain mouse or \n"
1318 " keyboard combinations do not work as intended.\n\n");
1319 SS = SUMA_StringAppend_va (SS,
1320 " %s: attenuation by background, toggle. "
1321 "See also :ref:`Plane Layering<Plane_Layering>`\n\n",
1322 SUMA_hkf("a", targ));
1323 SS = SUMA_StringAppend_va (SS,
1324 " %s: Backface/Frontface/Noface culling, toggle.\n",
1325 SUMA_hkf("B", targ));
1326 SS = SUMA_StringAppend_va (SS,
1327 " %s: background color, toggle. "
1328 "See also :ref:`Plane Layering <Plane_Layering>`\n\n",
1329 SUMA_hkf("b", targ));
1330 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1331 " %s: Set screen-coordinate-based clipping planes\n"
1332 " %s: Set object-coordinate-based clipping planes\n"
1333 " o Planes are defined by a string of the format:\n"
1334 " NAME: a, b, c, d\n"
1335 " Where NAME is a user-given short name,\n"
1336 " a, b, c, and d define the plane's equation\n"
1337 " aX + bY + cZ + d = 0\n"
1338 " Example: A: 0, 0, 1, 0\n"
1339 " o To delete a plane, just enter its name followed\n"
1340 " by the ':' (e.g. 'A:')\n"
1341 " o If you enter only two parameters after the name, \n"
1342 " they are assumed to be the c and d parameters,\n"
1343 " a and b are set to 0.\n"
1344 " o You are allowed a maximum of %d planes\n"
1345 "\n", SUMA_hkf("Shift-Ctrl+C", targ), SUMA_hkf(" Alt+C", targ),
1346 SUMA_MAX_N_CLIP_PLANES);
1347 SS = SUMA_StringAppend_va (SS,
1348 " %s: Toggle in and out of clipping plane mode. See\n"
1349 " 'Clipping Plane Mode:' section.\n\n",
1350 SUMA_hkf("Shift-Ctrl+C", targ));
1351 SS = SUMA_StringAppend_va (SS,
1352 " %s: load a node color file.\n\n", SUMA_hkf("c", targ));
1353 SS = SUMA_StringAppend_va (SS,
1354 " %s: Open draw :ref:`ROI controller<drawing_rois>`, and put cursor "\
1355 "in drawing mode.\n\n",
1356 SUMA_hkf("Ctrl+d", targ));
1357 SS = SUMA_StringAppend_va (SS,
1358 " %s: Attach to the current dataset 'parent' a dot product\n"
1359 " transform. The 'child' (transformed) dataset\n"
1360 " is created by calculating the dot product between\n"
1361 " each node time series and the time series of the current\n"
1362 " node. Each time you 'shift+ctrl+click (drag too if you like)'\n"
1363 " on the surface, with the child dataset in view, the dot product\n"
1364 " is recalculated. \n"
1365 " You can save the resultant datasets with 'ctrl+W' key (see below).\n"
1366 " Dset names are automatically formed.\n"
1367 " To stop the interactive dot product computations,\n"
1368 " switch back to the parent dset and press 'D' again.\n"
1369 " If the parent dataset is properly detrended and each \n"
1370 " time series is normalized so that its stdev is 1.0\n"
1371 " then the dot product is the cross correlation coefficient.\n"
1372 " Detrending and normalization can be carried out with:\n\n"
1373 " 3dDetrend -polort 4 -normalize \\\n"
1374 " -prefix dt.TS.niml.dset \\\n"
1375 " v2s.TS.niml.dset\n\n"
1376 " You can get a good feel for what this 'D' does by running\n\n"
1377 " @Install_InstaCorr_Demo\n\n"
1378 " That script will download and setup demo data for resting-state\n"
1379 " correlations. In particular, script @RunSingleSurfInstaCorr of the\n"
1380 " demo illustrates the 'D' feature.\n"
1381 "\n\n", SUMA_hkf("D", targ));
1382 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1383 " %s: Show all DO objects in DOv.\n\n", SUMA_hkf("d", targ));
1384 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1385 " %s: Look for OpenGL errors.\n\n", SUMA_hkf("Ctrl+r", targ));
1386 SS = SUMA_StringAppend_va (SS,
1387 " %s: Flip light position between +z and -z.\n", SUMA_hkf("F", targ));
1388 SS = SUMA_StringAppend_va (SS,
1389 " %s: functional overlay, toggle.\n\n", SUMA_hkf("f", targ));
1390 SS = SUMA_StringAppend_va (SS,
1391 " %s: graph data.\n"
1392 "%s\n", SUMA_hkf("g", targ), PlotCommonHelp);
1393 SS = SUMA_StringAppend_va (SS,
1394 " %s: Highlight nodes inside a specified box.\n"
1395 " Does not update other viewers\n"
1396 " Paints into existing colors\n"
1397 " Highlight is wiped out with new\n"
1398 " colors.\n\n", SUMA_hkf("H", targ));
1399 SS = SUMA_StringAppend_va (SS,
1400 " %s: help message\n\n", SUMA_hkf("Ctrl+h", targ));
1401 SS = SUMA_StringAppend_va (SS,
1402 " %s: Set the selected FaceSet on Surface Object\n"
1403 " in Focus. Does not update in other viewers\n"
1404 " or in AFNI.\n", SUMA_hkf("J", targ));
1405 SS = SUMA_StringAppend_va (SS,
1406 " %s: Set the cross hair to a certain node on SO in Focus.\n"
1407 " Append/prepend L or R to switch hemispheres.\n"
1408 " Does update in other viewers if linked by index\n"
1409 " and AFNI if connected\n", SUMA_hkf("j", targ));
1410 SS = SUMA_StringAppend_va (SS,
1411 " %s: Set the cross hair's XYZ location. \n"
1412 " Does update in other viewers\n"
1413 " if linked by XYZ"
1414 " and AFNI if connected\n", SUMA_hkf("Ctrl+j", targ));
1415 SS = SUMA_StringAppend_va (SS,
1416 " %s: Set the Focus node. \n"
1417 " Cross hair's XYZ remain unchanged.\n"
1418 " Does not update in other viewers\n"
1419 " or in AFNI\n\n", SUMA_hkf("Alt+j", targ));
1420 SS = SUMA_StringAppend_va (SS,
1421 " %s: Light's XYZ coordinates.\n"
1422 " Default setting is 0.0 0.0 %.1f \n", SUMA_hkf("L", targ),
1423 1.0 * SUMA_INTITIAL_LIGHT0_SWITCH);
1424 SS = SUMA_StringAppend_va (SS,
1425 " %s: Brighten specular and diffuse lights by a factor of 1/0.8\n",
1426 SUMA_hkf("Ctrl+L", targ) );
1427 SS = SUMA_StringAppend_va (SS,
1428 " %s: look at point\n", SUMA_hkf("l", targ));
1429 SS = SUMA_StringAppend_va (SS,
1430 " %s: look at cross hair\n", SUMA_hkf("Alt+l", targ));
1431 /* SS = SUMA_StringAppend_va (SS,
1432 " %s: Switch locking mode for all viewers \n"
1433 " between: No Lock, Index Lock and \n"
1434 " XYZ Lock. The switching is order is \n"
1435 " based on the lock of the first viewer.\n\n",
1436 SUMA_hkf("Ctrl+l", targ)); */
1437 SS = SUMA_StringAppend_va (SS,
1438 " %s: Dim specular and diffuse lights by a factor of 0.8\n",
1439 SUMA_hkf("Ctrl+l", targ) );
1440 SS = SUMA_StringAppend_va (SS,
1441 " %s: Dumps memory trace to file \n"
1442 " called malldump.NNN where NNN\n"
1443 " is the smallest number between\n"
1444 " 001 and 999 that has not been used.\n",
1445 SUMA_hkf("Alt+Ctrl+M", targ));
1446 SS = SUMA_StringAppend_va (SS,
1447 " %s: momentum, toggle\n\n", SUMA_hkf("m", targ));
1448 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1449 " %s: bring a node to direct view (does not work AT ALL)\n",
1450 SUMA_hkf("n", targ));
1451 SS = SUMA_StringAppend_va (SS,
1452 " %s: Increase opacity of all surfaces in viewer by 4 levels.\n"
1453 " Transparency levels accessible are: \n"
1454 " 0 (opaque), 25%%, 50%%, 75%%, 100%% (invisible)\n"
1455 "\n", SUMA_hkf("O", targ));
1456 SS = SUMA_StringAppend_va (SS,
1457 " %s: Increase opacity of selected object by 4 levels.\n"
1458 "\n", SUMA_hkf("Ctrl+O", targ));
1459 SS = SUMA_StringAppend_va (SS,
1460 " %s: Decrease opacity of all surfaces in viewer by 4 levels.\n"
1461 "\n", SUMA_hkf("o", targ));
1462 SS = SUMA_StringAppend_va (SS,
1463 " %s: Decrease opacity of selected object by 4 levels.\n"
1464 "\n", SUMA_hkf("Ctrl+o", targ));
1465 SS = SUMA_StringAppend_va (SS,
1466 " %s: Set new center of rotation.\n"
1467 " Enter nothing to go back to default.\n"
1468 "\n", SUMA_hkf("Alt+o", targ));
1469 SS = SUMA_StringAppend_va (SS,
1470 " %s: Open a new surface viewer window.\n\n",
1471 SUMA_hkf("Ctrl+n", targ));
1472
1473 SS = SUMA_StringAppend_va (SS,
1474 " %s: Viewer rendering mode \n"
1475 " (Fill, Line, Points, Hide), switch.\n\n"
1476 " %s: Selected object rendering mode\n"
1477 " (Fill, Line, Points, Hide), switch.\n\n"
1478 " %s: Cycle between restrictions of where DO node-based \n"
1479 " objects are displayed. Available modes are:\n"
1480 " All: No restrictions\n"
1481 " n3cross-hair: cross-hair node + 3 neighboring layers\n"
1482 " n2cross-hair: cross-hair node + 2 neighboring layers\n"
1483 " n1cross-hair: cross-hair node only\n"
1484 " None: Show nothing.\n\n"
1485 " See also -do_draw_mask option in DriveSuma\n\n"
1486 " ** DO stands for displayable objects, see also\n"
1487 " :ref:`Ctrl+Alt+s<LC_Ctrl+Alt+s>` below.\n"
1488 " ** For the moment, 'Alt+p' only applies to segment \n"
1489 " and sphere DOs that are node based. \n"
1490 " If you need it applied to other DOs, let me know.\n"
1491 , SUMA_hkf("p", targ), SUMA_hkf("Ctrl+p", targ), SUMA_hkf("Alt+p", targ));
1492 SS = SUMA_StringAppend_va (SS,
1493 " %s: Reset viewer and all surfaces to Fill \n"
1494 " rendering mode.\n\n", SUMA_hkf("P", targ));
1495 SS = SUMA_StringAppend_va (SS,
1496 " %s: record current image\n"
1497 " in an a la AFNI image viewer.\n"
1498 " Identical images are rejected.\n"
1499 " If you just save one image, the recording\n"
1500 " window has no visible controls for saving\n"
1501 " the image. Either take another picture, or\n"
1502 " use 'Shift+right click' to get a menu.\n\n", SUMA_hkf("r", targ));
1503 SS = SUMA_StringAppend_va (SS,
1504 " %s: Record current image directly to disk.\n"
1505 " Images are saved with a date stamp of the\n"
1506 " format PREFIX.X.yymmdd_hhmmss.MMM.jpg where:\n\n"
1507 " PREFIX controlled with SUMA_AutoRecordPrefix.\n"
1508 " See environment variable SUMA_AutoRecordPrefix for\n"
1509 " controlling prefix and output image type (suma -update_env).\n"
1510 " X The character indicating which viewer is recording (you can\n"
1511 " record from multiple viewers at once.\n"
1512 " yy, mm, dd, hh, mm, ss for year, month, day, hours, minutes,\n"
1513 " and seconds, respectively. MMM is a millisecond marker to\n"
1514 " avoid overwriting files. Unlike the other recording mode \n"
1515 " (with the 'R' key), there is no rejection of identical images\n"
1516 "\n"
1517 " This option is useful for saving a large number of images\n"
1518 " without running out of memory in the recorder GUI. \n"
1519 "\n"
1520 " Your current PREFIX is: %s%s\n"
1521 "\n", SUMA_hkf("Ctrl+r", targ),
1522 SUMAg_CF->autorecord->Path, SUMAg_CF->autorecord->FileName);
1523 SS = SUMA_StringAppend_va (SS,
1524 " %s: Increase the image oversampling factor.\n"
1525 " By increasing this factor, you can create\n"
1526 " images at a resolution higher than that \n"
1527 " of the SUMA window. This is done by subdividing \n"
1528 " the scene into NxN sections and rendering each\n"
1529 " section separately. The NxN renderings are\n"
1530 " saved in the image recorder. After you \n"
1531 " save the images to disk, you can stitch them\n"
1532 " using 2dcat (a la AFNI montage). \n\n"
1533 " Note that each section is still rendered at\n"
1534 " the resolution of the SUMA window. So the bigger\n"
1535 " the window the more resolution per section.\n"
1536 " However, you cannot exceed a certain limit\n"
1537 " on the number of pixels in the final image.\n"
1538 " This limitation is due to the graphics card\n"
1539 " on your system. SUMA will take care not to exceed\n"
1540 " this limit.\n", SUMA_hkf("Alt+r", targ));
1541 SS = SUMA_StringAppend_va(SS,
1542 " %s: Toggle continuous jpeg saving to disk.\n"
1543 " Naming of output images is automatic, same as in Ctrl+r.\n"
1544 " See help for Ctrl+r above for more info.\n"
1545 " %s: Toggle continuous recording \n"
1546 " to an a la AFNI image viewer.\n"
1547 " Identical images are rejected.\n\n"
1548 , SUMA_hkf("Ctrl+R", targ), SUMA_hkf("R", targ));
1549
1550 SS = SUMA_StringAppend_va (SS,
1551 " %s: Open :SPX::ref:`controller <SurfCont>`:DEF:controller:SPX: for \n"
1552 ": :surface in Focus.\n", SUMA_hkf("Ctrl+s", targ));
1553 SS = SUMA_StringAppend_va (SS,
1554 ":SPX:\n\n .. _load_DOs:\n\n:SPX:"
1555 " %s: Input filename containing displayable objects (a.k.a. :ref:`DOs<load_DOs>`).\n"
1556 " Files are of 1D format with a necessary comment\n"
1557 " at the top to indicate the type of objects in \n"
1558 " the file.\n"
1559 " Note 1: Repeatedly loading files with the same \n"
1560 " name will replace currently loaded versions.\n"
1561 " Note 2: Node-based (Types 3 and 4) objects\n"
1562 " will follow a node when its coordinates change.\n"
1563 " Note 3: See also 'Alt+p' for restricting which \n"
1564 " node-based objects get displayed.\n\n"
1565 ":SPX:\n\n .. _load_segments:\n\n:SPX:"
1566 " Type 1: :ref:`Segments<load_segments>` between (x0,y0,z0) and (x1,y1,z1) \n"
1567 " 1st line must be '#segments' (without quotes),\n"
1568 " or '#oriented_segments' (slower to render).\n"
1569 " One can also use #node-based_segments or \n"
1570 " #node-based_oriented_segments and use a node index\n"
1571 " in place of (x,y,z) triplets.\n"
1572 " Remainder of file is N rows, each defining a \n"
1573 " segment (or a vector) between two points.\n"
1574 " Column content depends on the number of columns\n"
1575 " in the file:\n\n"
1576 " For node-based:\n"
1577 " 2 cols: n0 n1\n"
1578 " 3 cols: n0 n1 th\n\n"
1579 " with th being line thickness\n\n"
1580 " 6 cols: n0 n1 c0 c1 c2 c3\n\n"
1581 " with c0..3 being the RGBA values\n"
1582 " between 0 and 1.0\n\n"
1583 " 7 cols: n0 n1 c0 c1 c2 c3 th\n"
1584 " 8 cols: n0 n1 c0 c1 c2 c3 th st\n\n"
1585 " with st being a stippling, or dashing for some,\n"
1586 " flag. Use integers between 1 and 5 for a variety\n"
1587 " of styles.\n\n"
1588 " For coordinate-based\n"
1589 " 6 cols: x0 y0 z0 x1 y1 z1\n"
1590 " 7 cols: x0 y0 z0 x1 y1 z1 th\n\n"
1591 " with th being line thickness\n\n"
1592 " 10 cols: x0 y0 z0 x1 y1 z1 c0 c1 c2 c3\n\n"
1593 " with c0..3 being the RGBA values\n"
1594 " between 0 and 1.0\n\n"
1595 " 11 cols: x0 y0 z0 x1 y1 z1 c0 c1 c2 c3 th\n"
1596 " 12 cols: x0 y0 z0 x1 y1 z1 c0 c1 c2 c3 th st\n\n"
1597 " with st defined above.\n\n"
1598 ":SPX:\n\n .. _load_directions:\n\n:SPX:"
1599 " Type 2: :ref:`Directions<load_directions>`, a variant of segments and oriented segments.\n"
1600 " 1st line must be '#directions' (without quotes).\n"
1601 " Remainder of file is N rows, each defining a \n"
1602 " direction.\n"
1603 " Column content depends on the number of columns\n"
1604 " in the file:\n\n"
1605 " 3 cols: dx dy dz\n\n"
1606 " with dx dy dz defining the direction. The\n"
1607 " triplet need not be of unit norm though that\n"
1608 " would affect the default coloring scheme detailed\n"
1609 " below. The segment drawn has origin 0, 0, 0\n\n"
1610 " 4 cols: dx dy dz mag\n\n"
1611 " with mag being a scaling factor for the direction.\n"
1612 " mag is 1 by default.\n\n"
1613 " 5 cols: dx dy dz mag th\n\n"
1614 " with th being the thickness of the line.\n"
1615 " Default is 1\n\n"
1616 " 6 cols: ox oy oz dx dy dz\n\n"
1617 " Specify the origin of the segment in o1, o2, o3.\n"
1618 " Default is origin 0, 0, 0 for all\n\n"
1619 " 7 cols: o1 o2 o3 dx dy dz mag\n\n"
1620 " Add individual scaling factors to case above\n"
1621 " Segment is from origin to origin+mag*direction\n\n"
1622 " 8 cols: o1 o2 o3 dx dy dz mag th\n\n"
1623 " Add thickness to case with 7 columns\n\n"
1624 " 9 cols: dx dy dz mag th c0 c1 c2 c3\n\n"
1625 " Add colors for each segment, with origin at 0,0,0\n\n"
1626 " 11 cols: ox oy oz dx dy dz mag c0 c1 c2 c3\n"
1627 " 12 cols: ox oy oz dx dy dz mag th c0 c1 c2 c3\n\n"
1628 ":SPX:\n\n .. _load_spheres:\n\n:SPX:"
1629 " Type 3: :ref:`Spheres<load_spheres>` centered at (ox, oy, oz) \n"
1630 " 1st line must be '#spheres' (without quotes).\n"
1631 " Remainder of file is N rows, each defining a \n"
1632 " sphere.\n"
1633 " Column content depends on the number of columns\n"
1634 " in the file:\n"
1635 " 3 cols: ox oy oz\n"
1636 " 4 cols: ox oy oz rd\n\n"
1637 " with rd being the radius of the sphere\n\n"
1638 " 5 cols: ox oy oz rd st\n\n"
1639 " with st being the style of the sphere's\n"
1640 " rendering. Choose from:\n\n"
1641 " 0: points\n"
1642 " 1: Lines\n"
1643 " 2: Filled\n\n"
1644 " 7 cols: ox oy oz c0 c1 c2 c3 \n\n"
1645 " with c0..3 being the RGBA values\n"
1646 " between 0 and 1.0\n\n"
1647 " 8 cols: ox oy oz c0 c1 c2 c3 rd\n"
1648 " 9 cols: ox oy oz c0 c1 c2 c3 rd st\n\n"
1649 ":SPX:\n\n .. _load_points:\n\n:SPX:"
1650 " Type 4: :ref:`Points<load_points>` at (ox, oy, oz) \n"
1651 " 1st line must be '#points' (without quotes).\n"
1652 " Remainder of file is N rows, each defining a \n"
1653 " point.\n"
1654 " Column content depends on the number of columns\n"
1655 " in the file:\n"
1656 " 3 cols: ox oy oz\n"
1657 " 4 cols: ox oy oz sz\n\n"
1658 " with sz being the size of the point\n\n"
1659 " 7 cols: ox oy oz c0 c1 c2 c3 \n\n"
1660 " with c0..3 being the RGBA values\n"
1661 " between 0 and 1.0\n\n"
1662 " 8 cols: ox oy oz c0 c1 c2 c3 sz\n"
1663 ":SPX:\n\n .. _load_node-based_vectors:\n\n:SPX:"
1664 " Type 5: :ref:`Vectors<load_node-based_vectors>` (vx, vy, vz) at surface nodes \n"
1665 " 1st line must be '#node-based_vectors' (without quotes)\n"
1666 " or '#node-based_ball-vectors' (slower to render).\n"
1667 " Remainder of file is N rows, each defining a \n"
1668 " a vector at a particular node of the current surface.\n"
1669 " Column content depends on the number of columns\n"
1670 " in the file:\n"
1671 " 3 cols: vx, vy, vz \n\n"
1672 " node index 'n' is implicit equal to row index.\n"
1673 " Vector 'v' is from coordinates of node 'n' to \n"
1674 " coordinates of node 'n' + 'v'\n\n"
1675 " 4 cols: n, vx, vy, vz \n\n"
1676 " Here the node index 'n' is explicit. You can\n"
1677 " have multiple vectors per node, one on \n"
1678 " each row.\n\n"
1679 " 5 cols: n, vx, vy, vz, gn\n\n"
1680 " with gn being a vector gain factor\n\n"
1681 " 8 cols: n, vx, vy, vz, c0 c1 c2 c3\n\n"
1682 " with with c0..3 being the RGBA values\n"
1683 " between 0 and 1.0\n\n"
1684 " 9 cols: n, vx, vy, vz, c0 c1 c2 c3 gn\n\n"
1685 ":SPX:\n\n .. _load_node-based_spheres:\n\n:SPX:"
1686 " Type 6: :ref:`Spheres<load_node-based_spheres>` centered at nodes n of the current surface\n"
1687 " 1st line must be '#node-based_spheres' (without quotes).\n"
1688 " Remainder of file is N rows, each defining a \n"
1689 " sphere.\n"
1690 " Column content depends on the number of columns\n"
1691 " in the file, see Type 2 for more details:\n"
1692 " 1 cols: n\n"
1693 " 2 cols: n rd\n"
1694 " 3 cols: n rd st\n"
1695 " 5 cols: n c0 c1 c2 c3 \n"
1696 " 6 cols: n c0 c1 c2 c3 rd\n"
1697 " 7 cols: n c0 c1 c2 c3 rd st\n\n"
1698 ":SPX:\n\n .. _load_planes:\n\n:SPX:"
1699 " Type 7: :ref:`Planes<load_planes>` defined with: ax + by + cz + d = 0.\n"
1700 " 1st line must be '#planes' (without quotes).\n"
1701 " Remainder of file is N rows, each defining a \n"
1702 " plane.\n"
1703 " Column content depends on the number of columns\n"
1704 " in the file:\n"
1705 " 7 cols: a b c d cx cy cz\n\n"
1706 " with the plane's equation being:\n"
1707 " ax + by + cz + d = 0\n"
1708 " cx,cy,cz is the center of the plane's\n"
1709 " representation. \n"
1710 " Yes, d is not of much use here.\n\n"
1711 " There are no node-based planes at the moment.\n"
1712 " They are a little inefficient to reproduce with\n"
1713 " each redraw. Complain if you need them.\n\n"
1714 ":SPX:\n\n .. _load_nido:\n\n:SPX:"
1715 " Type 8: :ref:`Another<load_nido>` class of displayable objects is described in\n"
1716 " the output of :ref:`suma -help_nido<suma--help_nido>` and the demonstration\n"
1717 " script :ref:`@DO.examples<@DO.examples>`. This new class allows for displaying \n"
1718 " text and figures in both screen and world space.\n"
1719 , SUMA_hkf("Ctrl+Alt+s", targ));
1720 SS = SUMA_StringAppend_va (SS,
1721 " %s: Switch mouse buttons 1 and 3.\n\n", SUMA_hkf("Alt+s", targ));
1722 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1723 " %s: Show all surface objects registered in DOv.\n\n",
1724 SUMA_hkf("S", targ));
1725 SS = SUMA_StringAppend_va (SS,
1726 " %s: talk to AFNI, toggle.\n", SUMA_hkf("t", targ));
1727 SS = SUMA_StringAppend_va (SS,
1728 " %s: Force a resend of \n"
1729 " surfaces to AFNI.\n\n", SUMA_hkf("Ctrl+t", targ));
1730
1731 SS = SUMA_StringAppend_va (SS,
1732 " %s: Start listening for niml connections\n\n", SUMA_hkf("T", targ));
1733 SS = SUMA_StringAppend_va (SS,
1734 " %s: Open SUMA controller.\n\n", SUMA_hkf("Ctrl+u", targ));
1735 SS = SUMA_StringAppend_va (SS,
1736 " %s: Whereami window of little use at the moment.\n"
1737 "\n" , SUMA_hkf("w", targ));
1738 SS = SUMA_StringAppend_va (SS,
1739 " %s: Write items stowed in SUMA's save list.\n"
1740 " This is used to write temporary dsets that\n"
1741 " are created on the fly in SUMA. Such sets include\n"
1742 " those created via the 'D' option above,\n"
1743 " or the results sent by 3dGroupInCorr\n"
1744 "\n", SUMA_hkf("Ctrl+W", targ));
1745 SS = SUMA_StringAppend_va (SS,
1746 " %s: Write ascii files containing the NodeList,\n"
1747 " the FaceSetList and the nodecolors of the \n"
1748 " surface in focus.\n\n", SUMA_hkf("W", targ));
1749 SS = SUMA_StringAppend_va (SS,
1750 " %s: Zoom in\n", SUMA_hkf("Z", targ));
1751 SS = SUMA_StringAppend_va (SS,
1752 " %s: Zoom out\n", SUMA_hkf("z", targ));
1753 SS = SUMA_StringAppend_va (SS,
1754 " %s: Show/Hide left hemisphere.\n"
1755 " %s: Show/Hide right hemisphere.\n"
1756 " Window title shows which \n"
1757 " hemispheres are shown :LR:\n"
1758 " :-R: :L-: or :--:\n\n", SUMA_hkf("[", targ), SUMA_hkf("]", targ));
1759 SS = SUMA_StringAppend_va (SS,
1760 " %s: Set the number of smoothing iterations\n"
1761 " to be applied to the foreground colors.\n"
1762 " This setting will be applied to all subsequent\n"
1763 " color sets.\n", SUMA_hkf("8", targ));
1764 SS = SUMA_StringAppend_va (SS,
1765 " %s: Smooth node colors by averaging with neighbors.\n"
1766 " The smoothing is only applied to the current colors,\n"
1767 " and will be not be applied to new color sets.\n\n",
1768 SUMA_hkf("*", targ));
1769 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1770 " %s: Compute curvatures along principal directions \n"
1771 " on the surface, results written to disk.\n\n",
1772 SUMA_hkf("@", targ));
1773 if (SUMAg_CF->Dev) SS = SUMA_StringAppend_va (SS,
1774 " %s: Compute convexity of surface, \n"
1775 " results written to disk.\n\n", SUMA_hkf("(", targ));
1776 SS = SUMA_StringAppend_va (SS,
1777 " :SPX:%s\n%s:DEF:%s/%s:SPX: (think </>): Switch to next/previous "
1778 "view state.\n"
1779 " Viewing angle is reset only when switching to\n"
1780 " a state with flat surfaces.:LR:\n"
1781 " See :term:`state` for more on the meaning of states for different "
1782 "object types.\n\n",
1783 SUMA_hkf(",", targ), SUMA_hkf(".", targ),
1784 SUMA_hkf(",", targ), SUMA_hkf(".", targ));
1785 SS = SUMA_StringAppend_va (SS,
1786 " %s: Toggle between Mapping Reference and\n"
1787 ": :Current view state.\n"
1788 ": :Viewing angle is reset only when switching to\n"
1789 ": :a state with flat surfaces.\n\n"
1790 , SUMA_hkf("SPACE", targ));
1791 SS = SUMA_StringAppend_va (SS,
1792 " %s: rotate about screen's Y axis\n"
1793 , SUMA_hkf("L-R arrows", targ));
1794 SS = SUMA_StringAppend_va (SS,
1795 " %s: rotate about screen's X axis\n"
1796 , SUMA_hkf("U-D arrows", targ));
1797 SS = SUMA_StringAppend_va (SS,
1798 " %s: translate along screen's \n"
1799 " X axis\n", SUMA_hkf("Shift+L-R arrows", targ));
1800 SS = SUMA_StringAppend_va (SS,
1801 " %s arrows: translate along screen's \n"
1802 " Y axis\n", SUMA_hkf("Shift+U-D arrows", targ));
1803 SS = SUMA_StringAppend_va (SS,
1804 " %s: LR cardinal views\n"
1805 , SUMA_hkf("Ctrl+L-R arrows", targ));
1806 SS = SUMA_StringAppend_va (SS,
1807 " %s: IS cardinal views\n"
1808 , SUMA_hkf("Ctrl+U-D arrows", targ));
1809 SS = SUMA_StringAppend_va (SS,
1810 " %s: AP cardinal views\n\n"
1811 , SUMA_hkf("Ctrl+Shift+U-D arrows", targ));
1812 SS = SUMA_StringAppend_va (SS,
1813 " %s: rotate CCW and CW about Z screen axis\n\n"
1814 , SUMA_hkf("Ctrl+Shift+L-R arrows", targ));
1815 SS = SUMA_StringAppend_va (SS,
1816 " %s: Move selected node to neighboring nodes\n"
1817 " in the direction of the screen's \n"
1818 " X axis. The default is to move one\n"
1819 " node at a time. You can alter this\n"
1820 " setting with the environment variable:\n"
1821 " SUMA_KeyNodeJump in your ~/.sumarc file.\n"
1822 , SUMA_hkf("Alt+L-R arrows", targ));
1823 SS = SUMA_StringAppend_va (SS,
1824 " %s: Same as Alt+L-R but in the direction \n"
1825 " of the screen's Y axis\n\n"
1826 , SUMA_hkf("Alt+U-D arrows", targ));
1827 SS = SUMA_StringAppend_va (SS,
1828 " %s: screen axis (X-Red, Y-Green), toggle. \n"
1829 , SUMA_hkf("F1", targ));
1830 SS = SUMA_StringAppend_va (SS,
1831 " %s: surface axis (X-Red, Y-Green, Z-Blue), \n"
1832 " switch. \n", SUMA_hkf("F2", targ));
1833 SS = SUMA_StringAppend_va (SS,
1834 " %s: cross hair, toggle. \n", SUMA_hkf("F3", targ));
1835 SS = SUMA_StringAppend_va (SS,
1836 " %s: node/voxel/edge/cell/tract/tie selection highlight, toggle. \n",
1837 SUMA_hkf("F4", targ));
1838 SS = SUMA_StringAppend_va (SS,
1839 " %s: FaceSet/Slice selection highlight, toggle.\n",
1840 SUMA_hkf("F5", targ));
1841 SS = SUMA_StringAppend_va (SS,
1842 " %s: Viewer background color, toggle.\n", SUMA_hkf("F6", targ));
1843 SS = SUMA_StringAppend_va (SS,
1844 " %s: Switch between color mixing modes.\n"
1845 " ORIG: Col = ( 1 - opacity ) * OldCol + opacity * NewCol \n"
1846 " MOD1: Col = ( 1 - opacity ) * OldCol + NewCol \n"
1847 , SUMA_hkf("F7", targ));
1848 SS = SUMA_StringAppend_va (SS,
1849 " %s: Viewing mode (Perspective or Orthographic Projection), toggle.\n"
1850 , SUMA_hkf("F8", targ));
1851 SS = SUMA_StringAppend_va (SS,
1852 " %s: Labels at cross hair, toggle.\n"
1853 , SUMA_hkf("F9", targ));
1854 SS = SUMA_StringAppend_va (SS,
1855 " %s: Toggle prying axis between surfaces' Z and Y axes.\n"
1856 , SUMA_hkf("F10", targ));
1857 SS = SUMA_StringAppend_va (SS,
1858 " %s: Change object rendering order.\n"
1859 " This order will affect the resultant image in\n"
1860 " the few instances where alpha transparency is\n"
1861 " used. The order can be specified for only three types of \n"
1862 " objects for now: graphs, surfaces, and volumes. \n"
1863 " If you want to render graphs first, followed by volumes then\n"
1864 " surfaces then set SUMA_ObjectDisplayOrder to something like:\n"
1865 " 'graph,vol,surf', or 'GVS'\n"
1866 , SUMA_hkf("F11", targ));
1867 SS = SUMA_StringAppend_va (SS,
1868 " %s: Time 20 scene renderings.\n\n", SUMA_hkf("F12", targ));
1869 SS = SUMA_StringAppend_va (SS,
1870 " %s: reset zoom and recenter surfaces.\n"
1871 " rest view angle for flat surfaces only.\n\n"
1872 , SUMA_hkf("HOME", targ));
1873 SS = SUMA_StringAppend_va (SS,
1874 " %s: close the surface viewer window.\n",
1875 SUMA_hkf("ESCAPE", targ));
1876 SS = SUMA_StringAppend_va (SS,
1877 " %s: close all surface viewer windows.\n\n"
1878 , SUMA_hkf("Shift+ESCAPE", targ));
1879
1880 if (targ == TXT) {
1881 SS = SUMA_StringAppend (SS,
1882 "Mouse Controls:\n");
1883 } else if (targ == SPX) {
1884 SS = SUMA_StringAppend (SS,
1885 ".. _MouseControls:\n\n"
1886 "Mouse Controls\n"
1887 "--------------\n\n");
1888 }
1889
1890 SS = SUMA_StringAppend (SS,
1891 "*On MACs*, Alt is the Apple/Command key.\n"
1892 " If it is commandeered by the OS, and you can't get it back, then\n"
1893 " try the alt/option key instead.\n\n"
1894 "*On Linux*, Turn NumLock OFF, otherwise certain mouse or \n"
1895 " keyboard combinations do not work as intended.\n\n");
1896
1897 SS = SUMA_StringAppend_va (SS,
1898 " %s: For 3D scenes, rotation as if you were \n"
1899 " using a trackball.\n"
1900 " For matrix displays, Button 1-Motion causes translation because\n"
1901 " rotations are of little use in matrix display mode.\n\n"
1902 " Pure vertical motion is equivalent to using \n"
1903 " the up/down arrow keys.\n\n"
1904 " Pure horizontal motion is equivalent to using \n"
1905 " the left/right arrow keys.\n\n"
1906 " Of course, the advantage to using the mouse is \n"
1907 " a continuous range of rotation angles and \n"
1908 " simultaneous rotations about the screen's \n"
1909 " X & Y axis.\n"
1910 , SUMA_hkf("Button 1-Motion", targ));
1911 SS = SUMA_StringAppend_va (SS,
1912 " %s: Rotate surfaces about the Z\n"
1913 " axis. This is useful at times for reorienting flat\n"
1914 " maps.\n", SUMA_hkf("Shift+Button 1-Motion", targ));
1915 SS = SUMA_StringAppend_va (SS,
1916 " %s: Undo Z rotation\n",
1917 SUMA_hkf("Shift+Button 1-DoubleClick", targ));
1918 SS = SUMA_StringAppend_va (SS,
1919 " %s: Pry open two hemispheres\n"
1920 " so that you can see medial or lateral walls better\n"
1921 " from one angle. Prying is disabled for flat surfaces\n"
1922 " and with spheres the effect is to rotate each sphere\n"
1923 " about the Y axis passing through its center. Also, prying\n"
1924 " is only enabled when the state you are viewing contains two \n"
1925 " surfaces, one on the left and one on the right.\n"
1926 " in 3D views, left right mouse movement cause a rotation about\n"
1927 " the front or rear I/S axis.\n"
1928 " Up down movements cause a shift along the left/right direction.\n"
1929 " You can select nodes (Button 3) on pried surfaces and still\n"
1930 " have AFNI jump to the proper location, and vice versa. However\n"
1931 " for the moment, you cannot draw in pried mode. If you attempt\n"
1932 " to draw, the surfaces are put back together.\n"
1933 " To make best use of this option, you want to have env. variable\n"
1934 " SUMA_LHunify = YES (see your ~/.sumarc for help)\n",
1935 SUMA_hkf("Ctrl+Button 1-Motion", targ));
1936 SS = SUMA_StringAppend_va (SS,
1937 " %s: Reset to Home viewing angle, zooming is\n"
1938 " left unchanged. See also 'HOME' key\n",
1939 SUMA_hkf("Button 1-DoubleClick", targ));
1940 SS = SUMA_StringAppend_va (SS,
1941 " %s: Undo surface prying.\n",
1942 SUMA_hkf("Ctrl+Button 1-DoubleClick", targ));
1943 SS = SUMA_StringAppend_va (SS,
1944 " %s: Translation for 3D scenes. Rotation for\n"
1945 " matrix displays.\n",
1946 SUMA_hkf("Button 2-Motion", targ));
1947
1948 SS = SUMA_StringAppend_va (SS,
1949 " %s"
1950 ":SPX:"
1951 " or :kbd:`Button 1+2-Motion`: \n"
1952 ":DEF:"
1953 ": OR \n"
1954 " Button 1+2-Motion: \n"
1955 ":SPX:"
1956 " Zoom in/out\n",
1957 SUMA_hkf("Shift+Button2-Motion", targ));
1958
1959 SS = SUMA_StringAppend_va (SS,
1960 " %s: Node/Voxel/Edge/etc. picking.\n"
1961 " In ROI mode, initiates a path to new node in DrawROI mode.\n"
1962 " Picking of graph edges/nodes can get difficult \n"
1963 " when surfaces are also displayed. To help with that,\n"
1964 " see Alt+Button 3-Press next.:LR:\n"
1965 " Also see :ref:`Selecting Objects<Selecting_Objects>` below.\n",
1966 SUMA_hkf("Button 3-Press", targ));
1967 SS = SUMA_StringAppend_va (SS,
1968 " %s: Graph edge/node picking in the presence \n"
1969 " of surfaces. Intersections with surfaces\n"
1970 " are ignored.\n",
1971 SUMA_hkf("Alt+Button 3-Press", targ));
1972 SS = SUMA_StringAppend_va (SS,
1973 " %s: Same as Alt+Button 3, but also display\n"
1974 " pick buffer. This is mostly for debugging or \n"
1975 " for understanding why selection is behaving\n"
1976 " strangely.\n",
1977 SUMA_hkf("Shift+Alt+Button 3-Press", targ));
1978 SS = SUMA_StringAppend_va (SS,
1979 " %s: Shows an image of the selection buffer for debugging purposes. \n"
1980 ": :In :ref:`Draw ROI Mode <Draw_ROI_Mode>`, the selection buffer is\n"
1981 ": :not displayed and the effect of the click is to select a node, \n"
1982 ": :but not to include it in the ROI.\n",
1983 SUMA_hkf("Shift+Button 3-Press", targ));
1984 SS = SUMA_StringAppend_va (SS,
1985 " %s: Yoke intensity selection to index of \n"
1986 " selected node*K. This is only possible if\n"
1987 " the currently visualized dataset has K times \n"
1988 " many sub-bricks as the surface has nodes. \n"
1989 " K is an integer.\n",
1990 SUMA_hkf("Ctrl+Button 3-Press", targ));
1991 SS = SUMA_StringAppend_va (SS,
1992 " %s: Pick and initiate call in Dot xform\n"
1993 " mode, or to GroupInCorr\n",
1994 SUMA_hkf("Shift+Ctrl+Button 3-Press", targ));
1995 SS = SUMA_StringAppend_va (SS,
1996 " %s: If double clicking on a tract mask, select\n"
1997 " the tract mask and turn the viewer into Mask\n"
1998 " Manipulation Mode. In this mode, the mask is\n"
1999 " shown as a wire mesh, and selections on any \n"
2000 " object will move the mask to that location.\n"
2001 " New tract/masks intersections are computed\n"
2002 " at the new location.\n"
2003 " To leave Mask Manipulation Mode, double \n"
2004 " click with button 3 either on the mask or \n"
2005 " in an area void of any objects.\n"
2006 " If double clicking with a graph object in \n"
2007 " focus and only connections from one node \n"
2008 " are shown, then revert to showing all graph\n"
2009 " connections. Without this, you can loose all\n"
2010 " other clickables if a certain node is not \n"
2011 " connected to anything.\n",
2012 SUMA_hkf("Button 3-DoubleClick", targ));
2013 SS = SUMA_StringAppend_va (SS,
2014 " %s: continuous picking whenever surface are present.\n"
2015 " No calls for dot product (InstaCorr)\n"
2016 " or GroupInCorr, while dragging.\n"
2017 " Continuous picking of graph edges/nodes if no\n"
2018 " surfaces are displayed.:LR:\n"
2019 " See :ref:`Continuous Selection<Continuous_Selection>` below\n",
2020 SUMA_hkf("Button 3-Motion", targ));
2021 SS = SUMA_StringAppend_va (SS,
2022 " %s: Continuous picking of graph edges/nodes. \n"
2023 " Intersections with surfaces are ignored.\n" ,
2024 SUMA_hkf("Alt+Button 3-Motion", targ));
2025 SS = SUMA_StringAppend_va (SS,
2026 " %s: continuous yoking of intensity selection to\n"
2027 " selected node*K.\n",
2028 SUMA_hkf("Ctrl+Button 3-Motion", targ));
2029 SS = SUMA_StringAppend_va (SS,
2030 " %s: Continuous picking and calls \n"
2031 " for dot product (InstaCorr)\n"
2032 " or GroupInCorr, while dragging.\n",
2033 SUMA_hkf("Shift+Ctrl+Button 3-Motion", targ));
2034 SS = SUMA_StringAppend_va(SS,
2035 " %s or Wheel: Zoom in/out\n",
2036 SUMA_hkf("Scroll", targ));
2037 SS = SUMA_StringAppend_va(SS,
2038 " %s or Shift+Wheel: change selected slice if current selected\n"
2039 " object is a volume.\n",
2040 SUMA_hkf("Shift+Scroll", targ));
2041 SS = SUMA_StringAppend_va(SS,
2042 " %s or Ctrl+Wheel: change the size of the currently selected \n"
2043 " tract mask. This only works when you're in\n"
2044 " "
2045 ":SPX::ref:`mask manipulation mode<Mask_Manipulation_Mode>`"
2046 ":DEF:mask manipulation mode:SPX:.\n",
2047 SUMA_hkf("Ctrl+Scroll", targ));
2048 SS = SUMA_StringAppend (SS,
2049 " \n");
2050
2051 if (targ == TXT) {
2052 SS = SUMA_StringAppend (SS,
2053 "Selecting Objects:\n");
2054 } else if (targ == SPX) {
2055 SS = SUMA_StringAppend (SS,
2056 "\n\n.. _Selecting_Objects:\n\n"
2057 "Selecting Objects\n"
2058 "-----------------\n\n");
2059 }
2060
2061 SS = SUMA_StringAppend (SS,
2062 "Selections are done with the :ref:`right-mouse click <Button_3-Press>` "
2063 "unless you request :ref:`otherwise <SUMA_SwapButtons_1_3>`.\n\n"
2064 "The selection of an object triggers a multitude of actions:\n\n"
2065 "* When :ref:`talking<LC_t>` to AFNI, a selection prompts AFNI to also jump "
2066 "to the corresponding location. SUMA can also talk to other programs such as"
2067 "HalloSuma\n\n"
2068 "* The controller for that object is popped to the top of the stack in the "
2069 "controllers notebook, and the cross-hair information in the controller gets "
2070 "updated.\n\n"
2071 "* Other open SUMA controllers are made to jump to the corresponding "
2072 "locations. Use the SUMA controller (:ref:`Ctrl+u<LC_Ctrl+u>`) to setup "
2073 "how different controllers are locked together. \n\n"
2074 "* When in :ref:`drawing ROIs mode<Draw_ROI_Mode>` a selection adds "
2075 "to the ROI being drawn. See :ref:`drawing_ROIs` for details, assuming it "
2076 "is written by now!\n\n"
2077 "* If you have 'click callbacks' initiated, a selection combined with "
2078 "the proper keyboard modifiers initiates a callback. An example of this "
2079 "would be the :ref:`surface-based instacorr<Shift+Ctrl+Button_3-Press>` "
2080 "or the variety of instacorr features in AFNI and/or 3dGroupInCorr. "
2081 "The following command can download and install demo material for "
2082 "InstaCorr excitement::\n\n"
2083 " @Install_InstaCorr_Demo -mini\n\n"
2084 "* If you are in :ref:`Mask Manipulation Mode<Mask_Manipulation_Mode>` "
2085 "Selections will make the tract mask jump to the selection location.\n\n"
2086 "Picking behavior depends on the object being selected as follows:\n\n"
2087 "1- Node picking on surfaces: Selection of a node on the surface involves "
2088 "finding intersected triangles, identifying the closest intersected triangle, "
2089 "and then identifying the closest node within it. The cross-hair is centered "
2090 "at the location of intersection and marked with a yellow sphere. The closest "
2091 "node in the triangle is marked with a small (tiny some say) blue sphere, and "
2092 "the triangle is highlighted with a gray line contour. Highlighting can be "
2093 "toggled with :ref:`F3 for cross-hair<F3>`, :ref:`F4 for selected node<F4>`, "
2094 "and :ref:`F5 for the triangle<F5>`\n\n"
2095 ":SPX:"
2096 ".. figure:: media/surface_selection.jpg\n"
2097 " :figwidth: 30%\n"
2098 " :align: center\n"
2099 " :name: media/surface_selection.jpg\n"
2100 "\n"
2101 " :ref:`(link)<media/surface_selection.jpg>`\n\n"
2102 ":SPX:"
2103 "2- Voxel picking in volumes: You can select voxels on rendered slices as "
2104 "long as the voxels are not thresholded out of view. They maybe too dark to "
2105 "see but still be selectable if their value exceeds that of the threshold.\n\n"
2106 "Selecting a voxel also highlights the slice. You can turn off the highlight "
2107 "rectangle with :ref:`F5 <F5>`.\n\n"
2108 "Note that you can also select from the 3D rendered volume and when 3D rendering"
2109 " is turned on. In that case, no slice highlighting is done.\n\n"
2110 "3- Edge/cell selection in graphs: Right click on an edge, matrix cell, "
2111 "or bundle representing the edge and the connection is rendered white. Because "
2112 "the graphs can be bidirectional, clicking on an edge between [n1, n2] with the "
2113 "click location closest to n1 would select edge n1-->n2, while clicking closer "
2114 "to n2 gets you edge n2-->n1. This also happens when you click on a bundle "
2115 "representation of the edge. The selected connection is highlighted in white "
2116 "and the highlighting can be toggled with the :ref:`F4 <F4>`\n\n"
2117 " Selecting an edge on the 3D graph is reflected on the dual representation "
2118 "in matrix form by highlighting the equivalent cell, and vice versa.\n\n"
2119 " Selecting a node on the 3D graph, by clicking on the ball representing the "
2120 "node, or the node's name highlights only the connections to that node. The "
2121 "same type of selection can be made by clicking on a row or column's label "
2122 "in the matrix representation form.\n\n"
2123 " When graphs are represented along with volumes and surfaces, picking "
2124 "an edge can get tricky. In that case, use :ref:`Alt+Button 3"
2125 "<Alt+Button_3-press>` instead.\n\n"
2126 "4- Tract selection: Right click on a tract - the hairline - for selecting "
2127 "a location along the tract. What's more to say ?\n\n");
2128
2129 SS = SUMA_StringAppend (SS,
2130 ":SPX:"
2131 "\n\n.. _Continuous_Selection:\n\n"
2132 "Continuous Selection\n"
2133 "^^^^^^^^^^^^^^^^^^^^\n\n"
2134 ":DEF:"
2135 "Continuous Selection:\n"
2136 ":SPX:"
2137 "You can select and drag and sweep through numerous locations. The main thing "
2138 "to keep in mind is that when you have a multitude of object types, such as "
2139 "tracts, voxels, surfaces, etc. SUMA locks the selection to the object type "
2140 "selected at the beginning of the sweep. So, if you begin the selection on a "
2141 "surface and drag, then the selections during the sweep are restricted to "
2142 "surfaces only.\n\n");
2143
2144 if (targ == TXT) {
2145 SS = SUMA_StringAppend (SS,
2146 "Viewer Menus:\n");
2147 } else if (targ == SPX) {
2148 SS = SUMA_StringAppend (SS,
2149 ".. _Viewer_Menus:\n\n"
2150 "Viewer Menus\n"
2151 "------------\n\n");
2152 }
2153
2154 if (targ == TXT) {
2155 SS = SUMA_StringAppend (SS,
2156 "File:\n");
2157 } else if (targ == SPX) {
2158 SS = SUMA_StringAppend (SS,
2159 ".. _File_Menu:\n\n"
2160 "File\n"
2161 "^^^^\n\n");
2162 }
2163
2164 SS = SUMA_StringAppend_va (SS,
2165 " %s: Save viewer's display settings.\n"
2166 " %s: Load and apply display settings.\n"
2167 " %s: Close this viewer.\n"
2168 " Exit SUMA if this is the only viewer.\n\n",
2169 SUMA_hkf("->Save View", targ),
2170 SUMA_hkf("->Load View", targ),
2171 SUMA_hkf("->Close", targ));
2172
2173 if (targ == TXT) {
2174 SS = SUMA_StringAppend (SS,
2175 "View:\n");
2176 } else if (targ == SPX) {
2177 SS = SUMA_StringAppend (SS,
2178 ".. _View_Menu:\n\n"
2179 "View\n"
2180 "^^^^\n\n");
2181 }
2182
2183 SS = SUMA_StringAppend_va (SS,
2184 " %s: Open SUMA controller interface.\n"
2185 " %s: Open selected surface's \n"
2186 " controller interface.\n"
2187 " %s: Open viewer's controller interface.\n"
2188 " \n"
2189 " %s: Toggle cross hair display.\n"
2190 " %s: Toggle highlight of selected node.\n"
2191 " %s: Toggle highlight of selected faceset.\n\n",
2192 SUMA_hkf("->SUMA Controller", targ),
2193 SUMA_hkf("->Surface Controller", targ),
2194 SUMA_hkf("->Viewer Controller", targ),
2195 SUMA_hkf("->Cross Hair", targ),
2196 SUMA_hkf("->Node in Focus", targ),
2197 SUMA_hkf("->Selected Faceset", targ));
2198
2199 if (targ == TXT) {
2200 SS = SUMA_StringAppend (SS,
2201 "Tools:\n");
2202 } else if (targ == SPX) {
2203 SS = SUMA_StringAppend (SS,
2204 ".. _Tools_Menu:\n\n"
2205 "Tools\n"
2206 "^^^^^\n\n");
2207 }
2208 SS = SUMA_StringAppend_va (SS,
2209 " %s: Open :ref:`Draw ROI controller<drawing_rois>`, also with :ref:`Ctrl+d<LC_Ctrl+d>`.\n\n",
2210 SUMA_hkf("->Draw ROI", targ));
2211
2212 if (targ == TXT) {
2213 SS = SUMA_StringAppend (SS,
2214 "Help:\n");
2215 } else if (targ == SPX) {
2216 SS = SUMA_StringAppend (SS,
2217 ".. _Help_Menu:\n\n"
2218 "Help\n"
2219 "^^^^\n\n");
2220 }
2221 SS = SUMA_StringAppend_va (SS,
2222 " %s: Opens window with this message.\n"
2223 " %s: Opens window that will \n"
2224 " contain errors and warnings\n"
2225 " typically output to screen.\n"
2226 " \n"
2227 " %s: Output debugging information\n"
2228 " about some of SUMA's global \n"
2229 " structure's variables.\n"
2230 " %s: Output debugging info on \n"
2231 " a viewer's structure.\n"
2232 " %s: Output debugging info on\n"
2233 " the selected surface's struct.\n"
2234 " \n"
2235 " %s: Turn on/off function in/out tracing.\n"
2236 " %s: Turn on memory tracing.\n"
2237 " Once turned on, this can't be turned off.\n\n"
2238 "\n",
2239 SUMA_hkf("->Usage", targ),
2240 SUMA_hkf("->Message Log", targ),
2241 SUMA_hkf("->SUMA Global", targ),
2242 SUMA_hkf("->Viewer Struct", targ),
2243 SUMA_hkf("->Surface Struct", targ),
2244 SUMA_hkf("->InOut Notify", targ),
2245 SUMA_hkf("->MemTrace", targ) );
2246
2247 // Clipping plane mode
2248 if (targ == TXT) {
2249 SS = SUMA_StringAppend (SS,
2250 "====================\n"
2251 "Clipping Plane Mode:\n"
2252 "====================\n");
2253 } else if (targ == SPX) {
2254 SS = SUMA_StringAppend (SS,
2255 ".. _Help_Menu:\n\n"
2256 "Clipping Plane Mode\n"
2257 "^^^^\n\n");
2258 }
2259
2260 SS = SUMA_StringAppend (SS,
2261 "Enter clipping plane mode with Shift-Ctrl-C. "
2262 "There can be up to 6 clipping planes numbered [1-6]. Each has a "
2263 "separate color being in order R G B C M Y. So plane 1 can be viewed "
2264 "in Red, plane 4 in Cyan, etc. The clipping planes may be viewed, as"
2265 " squares, with shift-C which toggles the squares on and off.\n\n"
2266
2267 "Below, \"a number\" can be in range [1-6]. \"active\" means a"
2268 " clipping plane is clipping, not just visible. The \"selected\""
2269 " plane is controlled with the action keys.\n\n"
2270
2271 "Clipping planes can be scrolled along their normals and/or rotated"
2272 " around their tangent or cotangent axis. Currently, the increment of "
2273 " one is also the increment of the others. The default increment is 1.0 "
2274 " where the tilt increment is in degrees. The minus (-) key halves the "
2275 " increment from its current value. The + key doubles the increment from "
2276 " its current value. The '=' key resets the increment to 1.0.\n\n"
2277
2278 "The current clipping planes can be written out to a file by clicking "
2279 "the 'w' key in clipping plane mode. A menu appears with the default "
2280 "output filename which is \"clippingPlane[current date and time].niml.vvs\". "
2281 "The user can replace the default name with any name that ends in .niml.vvs."
2282 " If the user subsequently adds the filename to a vvs file, along with the "
2283 "clippingPlaneFile key, and the vvs file is used as the argument of "
2284 "-com viewer_cont -load_view, the saved clipping planes are loaded when "
2285 "suma goes into clipping plane mode. DriveSuma puts suma in clipping "
2286 "plane mode if 'Shift+Ctrl+C' is used as the argument to -key.\n\n"
2287
2288 "Key+mouse behavior\n"
2289 "------------------\n\n"
2290 );
2291 SS = SUMA_StringAppend_va (SS,
2292 " %s: Toggle Cartesian axes on/off.\n\n",
2293 SUMA_hkf("a", targ));
2294 SS = SUMA_StringAppend_va (SS,
2295 " %s: Toggle view of all active clipping planes on/off.\n\n",
2296 SUMA_hkf("Shift+C", targ));
2297 SS = SUMA_StringAppend_va (SS,
2298 " %s: Toggles in and out of clipping plane mode.\n"
2299 " A \"C\" will be visible in the viewer title \n"
2300 " bar when this mode is active.\n\n",
2301 SUMA_hkf("Shift-Ctrl-C", targ));
2302 SS = SUMA_StringAppend_va (SS,
2303 " %s: Flip clipping direction of selected plane.\n\n",
2304 SUMA_hkf("ctrl-f", targ));
2305 SS = SUMA_StringAppend_va (SS,
2306 " %s: Scroll clipping plane inwards.\n\n",
2307 SUMA_hkf("s", targ));
2308 SS = SUMA_StringAppend_va (SS,
2309 " %s: Scroll clipping plane outwards.\n\n",
2310 SUMA_hkf("Shift-S", targ));
2311 SS = SUMA_StringAppend_va (SS,
2312 " %s: Write clipping planes, and their environment \n"
2313 " variables, to file.\n\n",
2314 SUMA_hkf("w", targ));
2315 SS = SUMA_StringAppend_va (SS,
2316 " %s: Toggle the clipping behavior of numbered plane on/off\n\n",
2317 SUMA_hkf("[a number]", targ));
2318 SS = SUMA_StringAppend_va (SS,
2319 " %s: Select the numbered clipping plane (so \n"
2320 " you can rotate/translate it with other key \n"
2321 " presses). There are six planes. By default \n"
2322 " plane 1 alone is shown.\n\n",
2323 SUMA_hkf("Ctrl-[a number]", targ));
2324 SS = SUMA_StringAppend_va (SS,
2325 " %s: Reset all clipping planes.\n\n",
2326 SUMA_hkf("0", targ));
2327 SS = SUMA_StringAppend_va (SS,
2328 " %s: Toggle all active clipping planes on or off.\n\n",
2329 SUMA_hkf("7", targ));
2330 SS = SUMA_StringAppend_va (SS,
2331 " %s: Translate a clipping plane in space.\n\n",
2332 SUMA_hkf("Alt/Cmd/Opt+[scroll-wheel]", targ));
2333 SS = SUMA_StringAppend_va (SS,
2334 " %s: Rotate clipping plane around x-axis.\n\n",
2335 SUMA_hkf("Alt/Cmd/Opt+[up-down arrow key]", targ));
2336 SS = SUMA_StringAppend_va (SS,
2337 " %s: Rotate clipping plane around y-axis.\n\n",
2338 SUMA_hkf("Alt/Cmd/Opt+[left-right arrow key]", targ));
2339 SS = SUMA_StringAppend_va (SS,
2340 " %s: Double the increment for rotation and scrolling.\n\n",
2341 SUMA_hkf("+", targ));
2342 SS = SUMA_StringAppend_va (SS,
2343 " %s: Halve the increment for rotation and scrolling.\n\n",
2344 SUMA_hkf("-", targ));
2345 SS = SUMA_StringAppend_va (SS,
2346 " %s: Reset the increment for rotation and scrolling.\n\n",
2347 SUMA_hkf("=", targ));
2348
2349 /* Environment variables */
2350 if (targ == TXT) {
2351 SS = SUMA_StringAppend (SS,
2352 "SUMA's environment vars:\n");
2353 } else if (targ == SPX) {
2354 SS = SUMA_StringAppend (SS,
2355 ".. _ENV_List:\n\n"
2356 "SUMA's env.\n"
2357 "-----------\n\n"
2358 "Below is a list of all of SUMA's environment variables and"
2359 " their default values.\n"
2360 "You can query the value of a variable as SUMA sees it with:\n\n"
2361 " :command:`suma -Vname=` \n\n"
2362 "with 'name' replaced by the environment variable's name.\n\n"
2363 " e.g: :command:`suma -VSUMA_ArrowRotAngle=`\n\n"
2364 "*Always* update your environment variable list with:\n\n"
2365 " :command:`suma -update_env`\n\n"
2366 "List of Variables\n"
2367 "^^^^^^^^^^^^^^^^^\n" );
2368 }
2369 s = SUMA_env_list_help(0, targ);
2370 SS = SUMA_StringAppend( SS, s); SUMA_free(s); s = NULL;
2371 SS = SUMA_StringAppend( SS, "\n");
2372
2373 if (targ == TXT) {
2374 SS = SUMA_StringAppend (SS,
2375 " More help at \n"
2376 " https://afni.nimh.nih.gov/pub/dist/edu/latest/suma/suma.pdf\n");
2377 SS = SUMA_StringAppend (SS,
2378 "\n");
2379 }
2380
2381 /* add latest additions */
2382 SS = SUMA_StringAppend (SS, "Current Version Info:\n");
2383 s = SUMA_New_Additions (0, 0);
2384 SS = SUMA_StringAppend (SS, s); SUMA_free(s); s = NULL;
2385
2386 /* clean SS */
2387 SS = SUMA_StringAppend (SS, NULL);
2388 /* copy s pointer and free SS */
2389 s = SS->s;
2390 SUMA_free(SS);
2391
2392 SUMA_RETURN (SUMA_Sphinx_String_Edit(&s, targ, 0));
2393
2394 }
2395
SUMA_help_xform_dot_message_Info(void)2396 char * SUMA_help_xform_dot_message_Info(void)
2397 {
2398 static char FuncName[]={"SUMA_help_xform_dot_message_Info"};
2399 char stmp[1000], *s = NULL;
2400 SUMA_STRING *SS = NULL;
2401
2402 SUMA_ENTRY;
2403
2404 SS = SUMA_StringAppend (NULL, NULL);
2405
2406 SS = SUMA_StringAppend (SS,
2407 "Interface for InstaCorr on the surface.\n"
2408 "Picking a node will initiate the computation\n"
2409 "of the cross correlation between the time series at that node\n"
2410 "and those on other nodes. The time series come from the dataset\n"
2411 "on which the xform is applied (see TS Parents below).\n"
2412 "\n"
2413 "This transform is applied to time series datasets. It is initiated\n"
2414 "by pressing 'D' on a 'parent' time series dataset. \n"
2415 "The result of the transform is one (or more) 'child' dataset that\n"
2416 "will initiate a new transform call with every new node selected.\n"
2417 "\n"
2418 "You can save the resultant datasets by pressing 'ctrl+W' in the SUMA\n"
2419 "window. The datasets are automatically named to reflect the seed location\n"
2420 "and the dataset whose voxels time series are dotted by the seed's.\n"
2421 "\n"
2422 );
2423
2424 SS = SUMA_StringAppend (SS,
2425 "xform block:\n"
2426 "------------\n"
2427 "Active: Activates/Deactivates transform. When active, selecting a node\n"
2428 " (right click) on the child dataset, recomputes the correlation \n"
2429 " using a reference time series from the parent timeseries dataset\n"
2430 " at the selected node.\n"
2431 " When toggled off, selecting a node does not cause a recalculation\n"
2432 " Another way to select a node without initiating a new calculation is\n"
2433 " to use 'Shift+Right Click\n"
2434 "\n"
2435 );
2436
2437
2438 SS = SUMA_StringAppend (SS,
2439 "datasets block:\n"
2440 "------------\n"
2441 "TS Parents: Names of parent datasets. These would be the datasets providing\n"
2442 " the time series for correlation calculations\n"
2443 "Preprocessed Dsets: \n"
2444 " Save: Save parent datasets after they were preprocessed per the options \n"
2445 " set in the 'options' block below. \n"
2446 " Preprocessed data is maintained in memory, but it is accessible \n"
2447 " to the user from the 'Switch Dset' button. By default, this dataset\n"
2448 " is not displayed and is positioned below its parent timeseries.\n"
2449 " You can change all these settings as you would for any datasets, and\n"
2450 " you can graph the preprocessed time series with the 'g' key.\n"
2451 "\n"
2452 );
2453
2454 SS = SUMA_StringAppend (SS,
2455 "options block:\n"
2456 "--------------\n"
2457 "Band Pass Range: Set the range of bandpass filtering.\n"
2458 " LF: Low frequency in Hz. Default is 0.01 Hz\n"
2459 " Use a value of 0.0 to have a low pass filter.\n"
2460 " HF: High frequency in Hz. Default is the lowest of \n"
2461 " 0.1Hz and the Nyquist frequency. \n"
2462 " Use a value of 1.0 to have a high pass filter.\n"
2463 " Note that even if LF = 0.0 and HF = 1.0, the 0th and Nyquist\n"
2464 " frequencies are always filtered. \n"
2465 " polort: Always set to 2 for now, and always applied.\n"
2466 " OrtFile: Load an extra set of regressors of no interest.\n"
2467 " Options:\n"
2468 " Save: Save options structure.\n"
2469 " Apply: Apply changes to options structure.\n"
2470 " Changes do not take effect unless 'Apply' is pressed.\n" "Disp. Cont. block:\n"
2471 "------------------\n"
2472 " Close: Close xform window. Settings are preserved.\n"
2473 " BHelp: Try it.\n"
2474 " Help: You're reading it.\n"
2475 );
2476 /* clean SS */
2477 SS = SUMA_StringAppend (SS, NULL);
2478 /* copy s pointer and free SS */
2479 s = SS->s;
2480 SUMA_free(SS);
2481
2482 SUMA_RETURN (s);
2483
2484 }
2485
2486 /*!
2487 Controls help message
2488 */
SUMA_help_message(FILE * Out,TFORM targ)2489 void SUMA_help_message(FILE *Out, TFORM targ)
2490 {
2491 char *s=NULL;
2492 static char FuncName[]={"SUMA_help_message"};
2493
2494 SUMA_ENTRY;
2495
2496 if (Out == NULL) {
2497 Out = stdout;
2498 }
2499
2500 s = SUMA_help_message_Info(targ);
2501 if (!s) {
2502 SUMA_S_Err("Failed in SUMA_help_message_Info.\n");
2503 }else {
2504 fprintf (Out, "%s\n", s);
2505 SUMA_free(s);
2506 }
2507
2508 SUMA_RETURNe;
2509 }
2510
SUMA_cmap_help_message(FILE * Out,TFORM targ)2511 void SUMA_cmap_help_message(FILE *Out, TFORM targ)
2512 {
2513 char *s=NULL;
2514 static char FuncName[]={"SUMA_cmap_help_message"};
2515
2516 SUMA_ENTRY;
2517
2518 if (Out == NULL) {
2519 Out = stdout;
2520 }
2521
2522 s = SUMA_help_Cmap_message_Info(NULL, targ);
2523 if (!s) {
2524 SUMA_S_Err("Failed in SUMA_help_Cmap_message_Info.\n");
2525 }else {
2526 fprintf (Out, "%s\n", s);
2527 SUMA_free(s);
2528 }
2529
2530 SUMA_RETURNe;
2531 }
2532
SUMA_All_Programs(void)2533 char *SUMA_All_Programs(void )
2534 {
2535 char *s=NULL;
2536 static char FuncName[]={"SUMA_All_Programs"};
2537 SUMA_STRING *SS = NULL;
2538
2539 SUMA_ENTRY;
2540
2541 SS = SUMA_StringAppend (NULL, NULL);
2542
2543 SS = SUMA_StringAppend ( SS,
2544 "+ List of programs in the SUMA package:\n"
2545 " 3dCRUISEtoAFNI\n"
2546 " 3dBRAIN_VOYAGERtoAFNI\n"
2547 " 3dSkullStrip\n"
2548 " 3dSurf2Vol\n"
2549 " 3dSurfMask\n"
2550 " 3dVol2Surf\n"
2551 " AnalyzeTrace\n"
2552 " CompareSurfaces\n"
2553 " ConvertSurface\n"
2554 " ConvexHull\n"
2555 " CreateIcosahedron\n"
2556 " DriveSuma\n"
2557 " FSread_annot\n"
2558 " inspec\n"
2559 " IsoSurface\n"
2560 " MakeColorMap\n"
2561 " MapIcosahedron\n"
2562 " quickspec\n"
2563 " ROI2dataset\n"
2564 " ROIgrow\n"
2565 " ScaleToMap\n"
2566 " SUMA_glxdino\n"
2567 " SurfaceMetrics\n"
2568 " SurfClust\n"
2569 " SurfDist\n"
2570 " SurfDsetInfo\n"
2571 " SurfInfo\n"
2572 " SurfMeasures\n"
2573 " SurfMesh\n"
2574 " SurfPatch\n"
2575 " SurfQual\n"
2576 " SurfSmooth\n"
2577 " SurfToSurf\n"
2578 );
2579
2580 /* clean SS */
2581 SS = SUMA_StringAppend (SS, NULL);
2582 /* copy s pointer and free SS */
2583 s = SS->s;
2584 SUMA_free(SS);
2585
2586 SUMA_RETURN(s);
2587
2588 }
2589
2590 /*!
2591 SUMA version
2592 */
2593
SUMA_Version(FILE * Out)2594 void SUMA_Version (FILE *Out)
2595 {
2596 static char FuncName[]={"SUMA_Version"};
2597 char *s = NULL;
2598
2599
2600 if (Out == NULL) {
2601 Out = stdout;
2602 }
2603
2604 s = SUMA_New_Additions (0, 0);
2605 if (s) {
2606 fprintf (Out, "\n %s\n", s);
2607 SUMA_free(s);
2608 } else {
2609 fprintf (Out, "\n");
2610 }
2611
2612 return;
2613 }
2614
2615 /*!
2616 Surface .. Volume relationships
2617 */
SUMA_VolSurf_help(FILE * Out)2618 void SUMA_VolSurf_help (FILE *Out)
2619 {
2620 if (Out == NULL) {
2621 Out = stdout;
2622 }
2623 fprintf (Out, "SUMA_VolSurf_help: This function is obsolete.\n");
2624 return;
2625 fprintf (Out, "\nVolume <--> Surface jeremiad:\n");
2626 fprintf (Out, "-----------------------------\n");
2627 fprintf (Out, "\tTo transform surface node coordinates to voxel coordinates a few parameters are required.\n");
2628 fprintf (Out, "\tThose paramters vary depending on the type of surfaces used. Currently, SUMA supports \n");
2629 fprintf (Out, "\tFreeSurfer and SureFit surfaces.\n");
2630 fprintf (Out, "\nParent Volume (VolPar):\n");
2631 fprintf (Out, "\tThe surface model is created from a high-resolution anatomical scan\n");
2632 fprintf (Out, "\treferred to as Parent Volume (VolPar).\n");
2633 fprintf (Out, "\tTo align the surface with data from a particular experiment, VolPar must\n");
2634 fprintf (Out, "\tbe brought to alignment with the experiemt's data.\n");
2635 fprintf (Out, "\tFor example, VolPar is aligned with data from experiment Day1 using:\n");
2636 fprintf (Out, "\t3dvolreg -clipit -twopass -twodup -zpad 8 -rotcom -verbose \n");
2637 fprintf (Out, "\t-base SPGR_Day1 -prefix VolPar_Day1 VolMast >>& VolParAlignLog\n");
2638 fprintf (Out, "\twhere SPGR_Day1 is the high-resolution anatomical scan obtained in\n");
2639 fprintf (Out, "\texperiment Day1 and VolPar_Day1 is VolPar aligned to SPGR_Day1.\n");
2640 fprintf (Out, "\nSurface segmentation programs typically require the resolution of VolPar to\n");
2641 fprintf (Out, "\tbe 1x1x1mm. Such volumes, especially for FreeSurfer are quite large and\n");
2642 fprintf (Out, "\t3dvolreg might run out of memory. If that happens, you could resample \n");
2643 fprintf (Out, "\tVolPar to a lower resolution such as 1.2x1.2x1.2mm, prior to registration. \n");
2644 fprintf (Out, "\tNote that SPGR_Day1 must have the same resolution and number of slices as VolPar.\n");
2645 fprintf (Out, "\n\t+FreeSurfer Parent Volume:\n");
2646 fprintf (Out, "\tConstruct VolPar from the .COR images used to create the surface using:\n");
2647 fprintf (Out, "\tto3d -prefix CW-cSurfParent-SPGR -xSLAB 127.5L-R -ySLAB 127.5S-I -zSLAB 127.5P-A COR-???\n");
2648 fprintf (Out, "\tExample command line for a FreeSurfer suface with VolPar aligned to experiment ARzs:\n");
2649 fprintf (Out, "\t./suma -vp CW-cSurfParent-SPGR_Reg2_ARzsspgrax_1mm_256pad_cor_RSP_down12+orig\\\n");
2650 fprintf (Out, "\t -spec CW-FreeSurfer.SumaSpec\n");
2651 fprintf (Out, "\n\t+SureFit Parent Volume:\n");
2652 fprintf (Out, "\tVolPar is the anatomical 1x1x1 mm volume in the correct orientation (LPI) \n");
2653 fprintf (Out, "\tthat is used by SureFit to create the surface. Typically, this volume has \n");
2654 fprintf (Out, "\tthe .Orient string in its name unless it was in LPI orientation from the \n");
2655 fprintf (Out, "\tstart. Because SureFit crops the volume before segmentation, it is also \n");
2656 fprintf (Out, "\tnecessary to supply the .params file along with VolPar. The .params file is \n");
2657 fprintf (Out, "\ttypically named something like: (anything here).L.full.sMRI.params for the \n");
2658 fprintf (Out, "\tleft full hemisphere. Example command line for a SureFit surface with VolPar:\n");
2659 fprintf (Out, "\t./suma -vp colin_short_Orient+orig. colin_short+orig.L.full.sMRI.params\\\n");
2660 fprintf (Out, "\t -s_s colin.fiducial.coord colin.topo");
2661 fprintf (Out, "\nor:\n");
2662 fprintf (Out, "\t./suma -vp CW-cSurfParent-SPGR-AX_LPI+orig. -spec CW-SureFit.SumaSpec\n");
2663 fprintf (Out, "\t\n");
2664 return;
2665 }
2666
2667
2668
SUMA_Help_AllSurfCont_old()2669 char * SUMA_Help_AllSurfCont_old ()
2670 {
2671 static char FuncName[]={"SUMA_Help_AllSurfCont_old"};
2672 char *s = NULL;
2673 SUMA_STRING *SS = NULL;
2674
2675 SUMA_ENTRY;
2676
2677 SS = SUMA_StringAppend (NULL, NULL);
2678
2679 SS = SUMA_StringAppend(SS,
2680 "\n"
2681 "\n"
2682 "----------------------------\n"
2683 "Help for Surface Controller:\n"
2684 "----------------------------\n"
2685 "The surface controller is for \n"
2686 "controlling properties pertinent\n"
2687 "to the surface selected (in focus).\n"
2688 "The Surface Controller is launched\n"
2689 "with 'ctrl+s' or \n"
2690 " View-->Object Controller .\n"
2691 "\n"
2692 );
2693 SS = SUMA_StringAppend_va(SS,
2694 "+ Surface Properties Block:\n"
2695 "\n"
2696 "++ more:\n%s\n"
2697 "\n"
2698 "++ Drw (DrawingMode, RenderMode):\n%s\n"
2699 "\n"
2700 "++ Trn (Transparency):\n%s\n"
2701 "\n"
2702 "++ Dsets:\n%s\n"
2703 "\n",
2704 SUMA_SurfContHelp_more, SUMA_SurfContHelp_RenderMode,
2705 SUMA_SurfContHelp_TransMode, SUMA_SurfContHelp_Dsets);
2706 SS = SUMA_StringAppend_va(SS,
2707 "+ Xhair Info Block:\n"
2708 "\n"
2709 "++ Xhr:\n%s\n"
2710 "\n"
2711 "++ Node:\n%s\n"
2712 "\n"
2713 "++ Tri:\n%s\n"
2714 "\n"
2715 "++ Node Values Table: %s\n"
2716 "+++ Col. Intens\n%s\n"
2717 "+++ Col. Thresh\n%s\n"
2718 "+++ Col. Bright:\n%s\n"
2719 "+++ Row Val:\n%s\n"
2720 "\n"
2721 "++ Node Label Table:\n"
2722 "+++ Row Lbl:\n%s\n"
2723 "\n",
2724 SUMA_SurfContHelp_Xhr, SUMA_SurfContHelp_Node, SUMA_SurfContHelp_Tri,
2725 SUMA_SurfContHelp_NodeValTblr0, SUMA_SurfContHelp_NodeValTblc1,
2726 SUMA_SurfContHelp_NodeValTblc2, SUMA_SurfContHelp_NodeValTblc3,
2727 SUMA_SurfContHelp_NodeValTblr0,
2728 SUMA_SurfContHelp_NodeLabelTblr0);
2729
2730 SS = SUMA_StringAppend_va(SS,
2731 "+ Dset Controls Block:\n"
2732 "\n"
2733 "++ Dset Info Table: \n"
2734 "+++ Row Lbl:\n%s\n"
2735 "+++ Row Par:\n%s\n"
2736 "\n"
2737 "++ Ord:\n%s\n"
2738 "\n"
2739 "++ Opa:\n%s\n"
2740 "\n"
2741 "++ Dim:\n%s\n"
2742 "\n"
2743 "++ view:\n%s\n"
2744 "\n"
2745 "++ Switch Dset:\n%s\n"
2746 "\n",
2747 SUMA_SurfContHelp_DsetLblTblr0, SUMA_SurfContHelp_DsetLblTblr1,
2748 SUMA_SurfContHelp_DsetOrd, SUMA_SurfContHelp_DsetOpa,
2749 SUMA_SurfContHelp_DsetDim,
2750 SUMA_SurfContHelp_DsetView, SUMA_SurfContHelp_DsetSwitch);
2751
2752 SS = SUMA_StringAppend_va(SS,
2753 "++ Load Dset:\n%s\n"
2754 "\n"
2755 "++ Load Col:\n%s\n"
2756 "\n",
2757 SUMA_SurfContHelp_DsetLoad,
2758 SUMA_SurfContHelp_DsetLoadCol);
2759
2760 SS = SUMA_StringAppend_va(SS,
2761 "+ Dset Mapping Block:\n"
2762 "\n"
2763 "++ Mapping Data: \n"
2764 "\n"
2765 "+++ I,T Link:\n%s\n"
2766 "+++ I\n%s\n"
2767 "++++ v:\n%s\n"
2768 "+++ T\n%s\n"
2769 "++++ v\n%s\n"
2770 "+++ B\n%s\n"
2771 "++++ v\n%s\n"
2772 "\n"
2773 " Note: %s\n"
2774 "\n",
2775 SUMA_SurfContHelp_Link,
2776 SUMA_SurfContHelp_SelInt, SUMA_SurfContHelp_SelIntTgl,
2777 SUMA_SurfContHelp_SelThr, SUMA_SurfContHelp_SelThrTgl,
2778 SUMA_SurfContHelp_SelBrt, SUMA_SurfContHelp_SelBrtTgl,
2779 SUMA_SurfContHelp_ArrowFieldMenu );
2780
2781 SS = SUMA_StringAppend_va(SS,
2782 "++ Mapping Parameters Table:\n%s\n"
2783 "+++ Col. Min\n%s\n"
2784 "+++ Col. Max\n%s\n"
2785 "+++ Row I\n%s\n"
2786 "+++ Row B1\n%s\n"
2787 "+++ Row B2\n%s\n"
2788 "+++ Row C\n%s\n"
2789 "\n",
2790 SUMA_SurfContHelp_SetRngTbl_r0,
2791 SUMA_SurfContHelp_SetRngTbl_c1, SUMA_SurfContHelp_SetRngTbl_c2,
2792 SUMA_SurfContHelp_SetRngTbl_r1, SUMA_SurfContHelp_SetRngTbl_r2,
2793 SUMA_SurfContHelp_SetRngTbl_r3, SUMA_SurfContHelp_SetRngTbl_r4);
2794
2795 SS = SUMA_StringAppend_va(SS,
2796 "++ Col\n%s\n"
2797 "\n"
2798 "++ Bias\n%s\n"
2799 "\n"
2800 "Cmp\n%s\n"
2801 "\n"
2802 "New\n%s\n"
2803 "\n"
2804 "|T|\n%s\n"
2805 "\n"
2806 "sym I\n%s\n"
2807 "\n"
2808 "shw 0\n%s\n"
2809 "\n",
2810 SUMA_SurfContHelp_Col, SUMA_SurfContHelp_Bias, SUMA_SurfContHelp_Cmp,
2811 SUMA_SurfContHelp_CmpNew, SUMA_SurfContHelp_AbsThr,
2812 SUMA_SurfContHelp_Isym,
2813 SUMA_SurfContHelp_Shw0);
2814
2815 SS = SUMA_StringAppend_va(SS,
2816 "++ Data Range Table:\n%s\n"
2817 "\n"
2818 "+++ Col Min\n%s\n"
2819 "+++ Col Node\n%s\n"
2820 "+++ Col Max\n%s\n"
2821 "+++ Col Node\n%s\n"
2822 "+++ Row I\n%s\n"
2823 "+++ Row T\n%s\n"
2824 "+++ Row B\n%s\n",
2825 SUMA_SurfContHelp_RangeTbl_c0,
2826 SUMA_SurfContHelp_RangeTbl_c1, SUMA_SurfContHelp_RangeTbl_c2,
2827 SUMA_SurfContHelp_RangeTbl_c3, SUMA_SurfContHelp_RangeTbl_c4,
2828 SUMA_SurfContHelp_RangeTbl_r1, SUMA_SurfContHelp_RangeTbl_r2,
2829 SUMA_SurfContHelp_RangeTbl_r3);
2830
2831
2832 SUMA_SS2S(SS, s);
2833
2834 SUMA_RETURN(s);
2835 }
2836
2837
SUMA_do_type_2_contwname(SUMA_DO_Types do_type)2838 char *SUMA_do_type_2_contwname(SUMA_DO_Types do_type)
2839 {
2840 static char FuncName[]={"SUMA_do_type_2_contwname"};
2841 static char s[10][64], *ss;
2842 static int nc=0;
2843
2844 SUMA_ENTRY;
2845
2846 ++nc; if (nc > 9) nc=0; ss=s[nc]; ss[0]='\0';
2847
2848 switch (do_type) {
2849 case ROIdO_type:
2850 snprintf(ss, 63,"ROICont");
2851 break;
2852 case SO_type:
2853 snprintf(ss, 63,"SurfCont");
2854 break;
2855 case VO_type:
2856 snprintf(ss, 63,"VolCont");
2857 break;
2858 case MASK_type:
2859 snprintf(ss, 63,"MaskCont");
2860 break;
2861 case GRAPH_LINK_type:
2862 snprintf(ss, 63,"GraphCont");
2863 break;
2864 case TRACT_type:
2865 snprintf(ss, 63,"TractCont");
2866 break;
2867 case not_DO_type:
2868 snprintf(ss, 63,"SumaCont");
2869 break;
2870 case GDSET_type:
2871 snprintf(ss, 63,"NoCont");
2872 break;
2873 case CDOM_type:
2874 snprintf(ss, 63,"CiftiCont");
2875 break;
2876 default:
2877 snprintf(ss, 63,"NOT_SET_FIX_ME");
2878 SUMA_S_Warn("Not ready for tp %d (%s)",
2879 do_type, SUMA_ObjectTypeCode2ObjectTypeName(do_type));
2880 SUMA_DUMP_TRACE("Who rang?");
2881 break;
2882 }
2883
2884 SUMA_RETURN(ss);
2885 }
2886
SUMA_All_Documented_Widgets(void)2887 char *SUMA_All_Documented_Widgets(void)
2888 {
2889 static char FuncName[]={"SUMA_All_Documented_Widgets"};
2890 char *s=NULL;
2891 SUMA_ENTRY;
2892 s = SUMA_append_replace_string(s,SUMA_Help_AllSumaCont(TXT),"\n",3);
2893 s = SUMA_append_replace_string(s,SUMA_Help_AllSurfCont(TXT),"\n",3);
2894 s = SUMA_append_replace_string(s,SUMA_Help_AllGraphCont(TXT),"\n",3);
2895 s = SUMA_append_replace_string(s,SUMA_Help_AllTractCont(TXT),"\n",3);
2896 s = SUMA_append_replace_string(s,SUMA_Help_AllMaskCont(TXT),"\n",3);
2897 s = SUMA_append_replace_string(s,SUMA_Help_AllVolCont(TXT),"\n",3);
2898 s = SUMA_append_replace_string(s,SUMA_Help_AllROICont(TXT),"\n",3);
2899 SUMA_RETURN(s);
2900 }
2901
SUMA_gsf(char * uwname,TFORM target,char ** hintout,char ** helpout)2902 char * SUMA_gsf(char *uwname, TFORM target, char **hintout, char **helpout)
2903 {
2904 static char FuncName[]={"SUMA_gsf"};
2905 static char sss[64]={"You Should Never Get This"};
2906 static int lock = 0;
2907 char *DW = SUMA_get_DocumentedWidgets();
2908
2909 SUMA_ENTRY;
2910
2911 if (target == WEB && !DW) { /* That is when gsf needs DocumentedWidgets */
2912 char *ss=NULL;
2913 if (!lock) {
2914 /* Need to init list of all documented widgets */
2915 /* Careful - next function will call SUMA_gsf() also.
2916 Make sure SUMA_gsf() does not rely on DocumentedWidgets
2917 for anything but WEB targ */
2918 ss = SUMA_All_Documented_Widgets();
2919 SUMA_set_DocumentedWidgets(&ss);
2920 DW = SUMA_get_DocumentedWidgets();
2921 if (!DW) {
2922 SUMA_S_Err("Should not fail here");
2923 lock = 1;
2924 SUMA_RETURN(sss);
2925 }
2926 } else {
2927 SUMA_S_Err("Failed and locked out");
2928 SUMA_RETURN(sss);
2929 }
2930 }
2931
2932 SUMA_RETURN(SUMA_gsf_eng(uwname, target, hintout, helpout));
2933 }
2934
2935
SUMA_Help_AllSurfCont(TFORM targ)2936 char * SUMA_Help_AllSurfCont (TFORM targ)
2937 {
2938 static char FuncName[]={"SUMA_Help_AllSurfCont"};
2939 char *s = NULL, *shh=NULL, *sii=NULL;
2940 int k=0;
2941 SUMA_STRING *SS = NULL;
2942 char *worder[] = {
2943 "SurfCont",
2944 "SurfCont->Surface_Properties",
2945 "SurfCont->Surface_Properties->more",
2946 "SurfCont->Surface_Properties->Drw",
2947 "SurfCont->Surface_Properties->Trn",
2948 "SurfCont->Surface_Properties->Dsets",
2949 "SurfCont->Xhair_Info",
2950 "SurfCont->Xhair_Info->Xhr",
2951 "SurfCont->Xhair_Info->Xhr.r00",
2952 "SurfCont->Xhair_Info->Node",
2953 "SurfCont->Xhair_Info->Node.r00",
2954 /*"SurfCont->Xhair_Info->Node[1]", Hints/help on headings */
2955 /*"SurfCont->Xhair_Info->Node[2]", Hints/help on headings */
2956 "SurfCont->Xhair_Info->Tri",
2957 "SurfCont->Xhair_Info->Tri.r00",
2958 /*"SurfCont->Xhair_Info->Tri[1]", Hints/help on headings */
2959 /*"SurfCont->Xhair_Info->Tri[2]", Hints/help on headings */
2960 "SurfCont->Xhair_Info->Val",
2961 "SurfCont->Xhair_Info->Val.c00",
2962 "SurfCont->Xhair_Info->Lbl",
2963 "SurfCont->Xhair_Info->Lbl.r00",
2964 "SurfCont->Dset_Controls",
2965 "SurfCont->Dset_Controls->Lbl+Par",
2966 "SurfCont->Dset_Controls->Lbl+Par.r00",
2967 "SurfCont->Dset_Controls->Ord",
2968 "SurfCont->Dset_Controls->Opa",
2969 "SurfCont->Dset_Controls->Dim",
2970 "SurfCont->Dset_Controls->Dsp",
2971 "SurfCont->Dset_Controls->1",
2972 "SurfCont->Dset_Controls->Switch_Dset",
2973 "SurfCont->Dset_Controls->Load_Dset",
2974 "SurfCont->Dset_Controls->Load_Col",
2975 "SurfCont->Dset_Mapping",
2976 "SurfCont->Dset_Mapping->IxT",
2977 "SurfCont->Dset_Mapping->I",
2978 "SurfCont->Dset_Mapping->I->v",
2979 "SurfCont->Dset_Mapping->T",
2980 "SurfCont->Dset_Mapping->T->v",
2981 "SurfCont->Dset_Mapping->B",
2982 "SurfCont->Dset_Mapping->B->v",
2983 "SurfCont->Dset_Mapping->ThrVal",
2984 "SurfCont->Dset_Mapping->ThrVal[0]",
2985 "SurfCont->Dset_Mapping->Cmap->bar",
2986 "SurfCont->Dset_Mapping->Cmap->scale",
2987 "SurfCont->Dset_Mapping->Cmap->pval",
2988 "SurfCont->Dset_Mapping->SetRangeTable",
2989 "SurfCont->Dset_Mapping->SetRangeTable.c00",
2990 "SurfCont->Dset_Mapping->SetRangeTable.r01",
2991 "SurfCont->Dset_Mapping->SetRangeTable.r02",
2992 "SurfCont->Dset_Mapping->SetRangeTable.r03",
2993 "SurfCont->Dset_Mapping->Col",
2994 "SurfCont->Dset_Mapping->Bias",
2995 "SurfCont->Dset_Mapping->Cmp",
2996 "SurfCont->Dset_Mapping->Cmp->New",
2997 "SurfCont->Dset_Mapping->abs_T",
2998 "SurfCont->Dset_Mapping->sym_I",
2999 "SurfCont->Dset_Mapping->shw_0",
3000 "SurfCont->Dset_Mapping->Clst",
3001 "SurfCont->Dset_Mapping->Clst.c00",
3002 "SurfCont->Dset_Mapping->Clst.c01",
3003 "SurfCont->Dset_Mapping->RangeTable",
3004 "SurfCont->Dset_Mapping->RangeTable.c00",
3005 "SurfCont->Dset_Mapping->RangeTable.r01",
3006 "SurfCont->Dset_Mapping->RangeTable.r02",
3007 "SurfCont->Dset_Mapping->RangeTable.r03",
3008 "SurfCont->Dset_Mapping->RangeTable.c01",
3009 "SurfCont->Dset_Mapping->RangeTable.c02",
3010 "SurfCont->Dset_Mapping->RangeTable.c03",
3011 "SurfCont->Dset_Mapping->RangeTable.c04",
3012 NULL };
3013 SUMA_ENTRY;
3014
3015 SS = SUMA_StringAppend (NULL, NULL);
3016
3017 k = 0;
3018 while (worder[k]) {
3019 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3020 if (!shh || strstr(sii, shh)) {/* help same as hint */
3021 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3022 } else {
3023 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3024 s, shh?shh:"");
3025 }
3026 SUMA_ifree(sii); SUMA_ifree(shh);
3027 ++k;
3028 }
3029
3030 SUMA_SS2S(SS, s);
3031
3032 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3033 }
3034
SUMA_Snap_AllSurfCont(char * froot)3035 void SUMA_Snap_AllSurfCont (char *froot)
3036 {
3037 static char FuncName[]={"SUMA_Snap_AllSurfCont"};
3038 char *s = NULL, *shh=NULL, *sii=NULL;
3039 int k=0;
3040 SUMA_ALL_DO *ado=NULL;
3041 SUMA_X_SurfCont *SurfCont=NULL;
3042
3043 SUMA_ENTRY;
3044
3045 ado = SUMA_findany_ADO_WithSurfContWidget(NULL, SO_type);
3046 if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURNe;
3047 if (!SUMA_viewSurfaceCont(NULL, ado, NULL)) {
3048 SUMA_S_Err("No viewer could be opened for %s", ADO_LABEL(ado));
3049 SUMA_RETURNe;
3050 }
3051 if (!froot) froot = "SurfCont";
3052
3053 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3054 ISQ_snapfile2 ( SurfCont->Mainform, s); SUMA_ifree(s);
3055
3056 s = SUMA_append_replace_string(froot, "Disp_Cont.jpg",".", 0);
3057 ISQ_snapfile2 ( SurfCont->DispFrame, s); SUMA_ifree(s);
3058
3059 s = SUMA_append_replace_string(froot, "Surface_Properties.jpg",".", 0);
3060 ISQ_snapfile2 ( SurfCont->SurfFrame, s); SUMA_ifree(s);
3061
3062 s = SUMA_append_replace_string(froot, "Xhair_Info.jpg",".", 0);
3063 ISQ_snapfile2 ( SurfCont->Xhair_fr, s); SUMA_ifree(s);
3064
3065 s = SUMA_append_replace_string(froot, "Dset_Controls.jpg",".", 0);
3066 ISQ_snapfile2 ( SurfCont->ColPlane_fr, s); SUMA_ifree(s);
3067
3068 s = SUMA_append_replace_string(froot, "Dset_Mapping.jpg",".", 0);
3069 ISQ_snapfile2 ( SurfCont->DsetMap_fr, s); SUMA_ifree(s);
3070
3071 SUMA_RETURNe;
3072 }
3073
SUMA_Help_AllSumaCont(TFORM targ)3074 char * SUMA_Help_AllSumaCont (TFORM targ)
3075 {
3076 static char FuncName[]={"SUMA_Help_AllSumaCont"};
3077 char *s = NULL, *shh=NULL, *sii=NULL;
3078 int k=0;
3079 SUMA_STRING *SS = NULL;
3080 char *worder[] = {
3081 "SumaCont",
3082 "SumaCont->Lock",
3083 "SumaCont->Lock->View",
3084 "SumaCont->Lock->All",
3085 "SumaCont->Viewer",
3086 "SumaCont->BHelp",
3087 "SumaCont->Close",
3088 "SumaCont->done",
3089 NULL };
3090 SUMA_ENTRY;
3091
3092 SS = SUMA_StringAppend (NULL, NULL);
3093
3094 k = 0;
3095 while (worder[k]) {
3096 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3097 if (!shh || strstr(sii, shh)) {/* help same as hint */
3098 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3099 } else {
3100 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3101 s, shh?shh:"");
3102 }
3103 SUMA_ifree(sii); SUMA_ifree(shh);
3104 ++k;
3105 }
3106
3107 SUMA_SS2S(SS, s);
3108
3109 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3110 }
3111
SUMA_Snap_AllSumaCont(char * froot)3112 void SUMA_Snap_AllSumaCont (char *froot)
3113 {
3114 static char FuncName[]={"SUMA_Snap_AllSumaCont"};
3115 char *s = NULL, *shh=NULL, *sii=NULL;
3116
3117 SUMA_ENTRY;
3118
3119 if (!SUMAg_CF->X->SumaCont->AppShell) { /* create */
3120 SUMA_cb_createSumaCont( NULL, NULL, NULL);
3121 }
3122 if (!froot) froot = "SumaCont";
3123
3124 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3125 ISQ_snapfile2 ( SUMAg_CF->X->SumaCont->form, s); SUMA_ifree(s);
3126
3127 s = SUMA_append_replace_string(froot, "Lock.jpg",".", 0);
3128 ISQ_snapfile2 ( SUMAg_CF->X->SumaCont->LockFrame, s); SUMA_ifree(s);
3129
3130 s = SUMA_append_replace_string(froot, "Viewer.jpg",".", 0);
3131 ISQ_snapfile2 ( SUMAg_CF->X->SumaCont->AppFrame, s); SUMA_ifree(s);
3132
3133
3134 SUMA_RETURNe;
3135 }
3136
3137
SUMA_Help_AllGraphCont(TFORM targ)3138 char * SUMA_Help_AllGraphCont (TFORM targ)
3139 {
3140 static char FuncName[]={"SUMA_Help_AllGraphCont"};
3141 char *s = NULL, *shh=NULL, *sii=NULL;
3142 int k=0;
3143 SUMA_STRING *SS = NULL;
3144 char *worder[] = {
3145 "GraphCont",
3146 "GraphCont->Graph_Dset_Properties",
3147 "GraphCont->Graph_Dset_Properties->more",
3148 "GraphCont->Xhair_Info",
3149 "GraphCont->Xhair_Info->Xhr",
3150 "GraphCont->Xhair_Info->Xhr.r00",
3151 "GraphCont->Xhair_Info->Edge",
3152 "GraphCont->Xhair_Info->Edge.r00",
3153 "GraphCont->Xhair_Info->Node",
3154 "GraphCont->Xhair_Info->Node.r00",
3155 "GraphCont->Xhair_Info->Val",
3156 "GraphCont->Xhair_Info->Val.c00",
3157 "GraphCont->Xhair_Info->Lbl",
3158 "GraphCont->Xhair_Info->Lbl.r00",
3159 "GraphCont->GDset_Controls",
3160 "GraphCont->GDset_Controls->Dim",
3161 "GraphCont->GDset_Controls->Bundles",
3162 "GraphCont->GDset_Controls->CN",
3163 "GraphCont->GDset_Controls->Rd",
3164 "GraphCont->GDset_Controls->Rd->Gn",
3165 "GraphCont->GDset_Controls->Br",
3166 "GraphCont->GDset_Controls->Fo",
3167 "GraphCont->GDset_Controls->Cl",
3168 "GraphCont->GDset_Controls->Sh",
3169 "GraphCont->GDset_Controls->U",
3170 "GraphCont->GDset_Controls->Th",
3171 "GraphCont->GDset_Controls->Th->Gn",
3172 "GraphCont->GDset_Controls->St",
3173 "GraphCont->GDset_Mapping",
3174 "GraphCont->GDset_Mapping->IxT",
3175 "GraphCont->GDset_Mapping->I",
3176 "GraphCont->GDset_Mapping->I->v",
3177 "GraphCont->GDset_Mapping->T",
3178 "GraphCont->GDset_Mapping->T->v",
3179 "GraphCont->GDset_Mapping->B",
3180 "GraphCont->GDset_Mapping->B->v",
3181 "GraphCont->GDset_Mapping->ThrVal",
3182 "GraphCont->GDset_Mapping->ThrVal[0]",
3183 "GraphCont->GDset_Mapping->Cmap->bar",
3184 "GraphCont->GDset_Mapping->Cmap->scale",
3185 "GraphCont->GDset_Mapping->Cmap->pval",
3186 "GraphCont->GDset_Mapping->SetRangeTable.c00",
3187 "GraphCont->GDset_Mapping->SetRangeTable.r01",
3188 "GraphCont->GDset_Mapping->SetRangeTable.r02",
3189 "GraphCont->GDset_Mapping->SetRangeTable.r03",
3190 "GraphCont->GDset_Mapping->Col",
3191 "GraphCont->GDset_Mapping->Cmp",
3192 "GraphCont->GDset_Mapping->Cmp->New",
3193 "GraphCont->GDset_Mapping->abs_T",
3194 "GraphCont->GDset_Mapping->sym_I",
3195 "GraphCont->GDset_Mapping->shw_0",
3196 "GraphCont->GDset_Mapping->RangeTable",
3197 "GraphCont->GDset_Mapping->RangeTable.c00",
3198 "GraphCont->GDset_Mapping->RangeTable.r01",
3199 "GraphCont->GDset_Mapping->RangeTable.r02",
3200 "GraphCont->GDset_Mapping->RangeTable.r03",
3201 "GraphCont->GDset_Mapping->RangeTable.c01",
3202 "GraphCont->GDset_Mapping->RangeTable.c02",
3203 "GraphCont->GDset_Mapping->RangeTable.c03",
3204 "GraphCont->GDset_Mapping->RangeTable.c04",
3205 NULL };
3206 SUMA_ENTRY;
3207
3208 SS = SUMA_StringAppend (NULL, NULL);
3209
3210 k = 0;
3211 while (worder[k]) {
3212 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3213 if (!shh || strstr(sii, shh)) {/* help same as hint */
3214 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3215 } else {
3216 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3217 s, shh?shh:"");
3218 }
3219 SUMA_ifree(sii); SUMA_ifree(shh);
3220 ++k;
3221 }
3222
3223 SUMA_SS2S(SS, s);
3224
3225 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3226 }
3227
SUMA_Snap_AllGraphCont(char * froot)3228 void SUMA_Snap_AllGraphCont (char *froot)
3229 {
3230 static char FuncName[]={"SUMA_Snap_AllGraphCont"};
3231 char *s = NULL, *shh=NULL, *sii=NULL;
3232 int k=0;
3233 SUMA_ALL_DO *ado=NULL;
3234 SUMA_X_SurfCont *SurfCont=NULL;
3235
3236 SUMA_ENTRY;
3237
3238 ado = SUMA_findany_ADO_WithSurfContWidget(NULL, GRAPH_LINK_type);
3239 if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURNe;
3240 if (!SUMA_viewSurfaceCont(NULL, ado, NULL)) {
3241 SUMA_S_Err("No viewer could be opened for %s", ADO_LABEL(ado));
3242 SUMA_RETURNe;
3243 }
3244
3245 if (!froot) froot = "GraphCont";
3246
3247 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3248 ISQ_snapfile2 ( SurfCont->Mainform, s); SUMA_ifree(s);
3249
3250 s = SUMA_append_replace_string(froot, "Disp_Cont.jpg",".", 0);
3251 ISQ_snapfile2 ( SurfCont->DispFrame, s); SUMA_ifree(s);
3252
3253 s = SUMA_append_replace_string(froot, "Graph_Dset_Properties.jpg",".", 0);
3254 ISQ_snapfile2 ( SurfCont->SurfFrame, s); SUMA_ifree(s);
3255
3256 s = SUMA_append_replace_string(froot, "Xhair_Info.jpg",".", 0);
3257 ISQ_snapfile2 ( SurfCont->Xhair_fr, s); SUMA_ifree(s);
3258
3259 s = SUMA_append_replace_string(froot, "GDset_Controls.jpg",".", 0);
3260 ISQ_snapfile2 ( SurfCont->ColPlane_fr, s); SUMA_ifree(s);
3261
3262 s = SUMA_append_replace_string(froot, "GDset_Mapping.jpg",".", 0);
3263 ISQ_snapfile2 ( SurfCont->DsetMap_fr, s); SUMA_ifree(s);
3264
3265 SUMA_RETURNe;
3266 }
3267
SUMA_Help_AllROICont(TFORM targ)3268 char * SUMA_Help_AllROICont (TFORM targ)
3269 {
3270 static char FuncName[]={"SUMA_Help_AllROICont"};
3271 char *s = NULL, *shh=NULL, *sii=NULL;
3272 int k=0;
3273 SUMA_STRING *SS = NULL;
3274 char *worder[] = {
3275 "ROICont",
3276 "ROICont->ROI",
3277 "ROICont->ROI->Draw",
3278 "ROICont->ROI->Cont.",
3279 "ROICont->ROI->Pen",
3280 "ROICont->ROI->Afni",
3281 "ROICont->ROI->Dist",
3282 "ROICont->ROI->Label",
3283 "ROICont->ROI->Value",
3284 "ROICont->ROI->Undo",
3285 "ROICont->ROI->Redo",
3286 "ROICont->ROI->Join",
3287 "ROICont->ROI->Finish",
3288 "ROICont->ROI->Switch_ROI",
3289 "ROICont->ROI->Load",
3290 "ROICont->ROI->delete_ROI",
3291 "ROICont->ROI->Save",
3292 NULL };
3293 SUMA_ENTRY;
3294
3295 SS = SUMA_StringAppend (NULL, NULL);
3296
3297 k = 0;
3298 while (worder[k]) {
3299 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3300 if (!shh || strstr(sii, shh)) {/* help same as hint */
3301 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3302 } else {
3303 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3304 s, shh?shh:"");
3305 }
3306 SUMA_ifree(sii); SUMA_ifree(shh);
3307 ++k;
3308 }
3309
3310 SUMA_SS2S(SS, s);
3311
3312 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3313 }
3314
SUMA_Snap_AllROICont(char * froot)3315 void SUMA_Snap_AllROICont (char *froot)
3316 {
3317 static char FuncName[]={"SUMA_Snap_AllROICont"};
3318 char *s = NULL, *shh=NULL, *sii=NULL;
3319 int k=0;
3320
3321 SUMA_ENTRY;
3322
3323 if (!SUMAg_CF->X->DrawROI) SUMA_RETURNe;
3324 if (!SUMA_OpenDrawROIController(NULL)) {
3325 SUMA_S_Err("DrawROI controller could not be open");
3326 SUMA_RETURNe;
3327 }
3328 if (!SUMA_wait_till_visible(SUMAg_CF->X->DrawROI->AppShell, 5000)) {
3329 SUMA_S_Err("Widget not visible after long wait");
3330 SUMA_RETURNe;
3331 }
3332 if (!froot) froot = "ROICont";
3333
3334 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3335 ISQ_snapfile2 ( SUMAg_CF->X->DrawROI->form, s); SUMA_ifree(s);
3336
3337 s = SUMA_append_replace_string(froot, "ROI.jpg",".", 0);
3338 ISQ_snapfile2 ( SUMAg_CF->X->DrawROI->frame, s); SUMA_ifree(s);
3339
3340 SUMA_RETURNe;
3341 }
3342
3343
SUMA_Help_AllVolCont(TFORM targ)3344 char * SUMA_Help_AllVolCont (TFORM targ)
3345 {
3346 static char FuncName[]={"SUMA_Help_AllVolCont"};
3347 char *s = NULL, *shh=NULL, *sii=NULL;
3348 int k=0;
3349 SUMA_STRING *SS = NULL;
3350 char *worder[] = {
3351 "VolCont",
3352 "VolCont->Volume_Properties",
3353 "VolCont->Volume_Properties->more",
3354 "VolCont->Xhair_Info",
3355 "VolCont->Xhair_Info->Xhr",
3356 "VolCont->Xhair_Info->Xhr.r00",
3357 "VolCont->Xhair_Info->Ind",
3358 "VolCont->Xhair_Info->Ind.r00",
3359 "VolCont->Xhair_Info->IJK",
3360 "VolCont->Xhair_Info->IJK.r00",
3361 "VolCont->Xhair_Info->Val",
3362 "VolCont->Xhair_Info->Val.c00",
3363 "VolCont->Xhair_Info->Lbl",
3364 "VolCont->Xhair_Info->Lbl.r00",
3365 "VolCont->Slice_Controls",
3366 "VolCont->Ax_slc->Ax",
3367 "VolCont->Sa_slc->Sa",
3368 "VolCont->Co_slc->Co",
3369 "VolCont->Slice_Controls->Trn",
3370 "VolCont->Slice_Controls->Slices_At_+",
3371 "VolCont->Volume_Rendering_Controls",
3372 "VolCont->VR->Ns",
3373 "VolCont->VR->Ns->v",
3374 "VolCont->Dset_Controls",
3375 "VolCont->Dset_Controls->Lbl",
3376 "VolCont->Dset_Controls->Lbl.r00",
3377 "VolCont->Dset_Controls->Dim",
3378 "VolCont->Dset_Controls->Avl",
3379 "VolCont->Dset_Controls->Ath",
3380 "VolCont->Dset_Mapping",
3381 "VolCont->Dset_Mapping->IxT",
3382 "VolCont->Dset_Mapping->I",
3383 "VolCont->Dset_Mapping->I->v",
3384 "VolCont->Dset_Mapping->T",
3385 "VolCont->Dset_Mapping->T->v",
3386 "VolCont->Dset_Mapping->B",
3387 "VolCont->Dset_Mapping->B->v",
3388 "VolCont->Dset_Mapping->ThrVal",
3389 "VolCont->Dset_Mapping->ThrVal[0]",
3390 "VolCont->Dset_Mapping->Cmap->bar",
3391 "VolCont->Dset_Mapping->Cmap->scale",
3392 "VolCont->Dset_Mapping->Cmap->pval",
3393 "VolCont->Dset_Mapping->SetRangeTable",
3394 "VolCont->Dset_Mapping->SetRangeTable.c00",
3395 "VolCont->Dset_Mapping->SetRangeTable.r01",
3396 "VolCont->Dset_Mapping->SetRangeTable.r02",
3397 "VolCont->Dset_Mapping->SetRangeTable.r03",
3398 "VolCont->Dset_Mapping->Col",
3399 "VolCont->Dset_Mapping->Cmp",
3400 "VolCont->Dset_Mapping->Cmp->New",
3401 "VolCont->Dset_Mapping->abs_T",
3402 "VolCont->Dset_Mapping->sym_I",
3403 "VolCont->Dset_Mapping->shw_0",
3404 "VolCont->Dset_Mapping->RangeTable",
3405 "VolCont->Dset_Mapping->RangeTable.c00",
3406 "VolCont->Dset_Mapping->RangeTable.r01",
3407 "VolCont->Dset_Mapping->RangeTable.r02",
3408 "VolCont->Dset_Mapping->RangeTable.r03",
3409 "VolCont->Dset_Mapping->RangeTable.c01",
3410 "VolCont->Dset_Mapping->RangeTable.c02",
3411 "VolCont->Dset_Mapping->RangeTable.c03",
3412 "VolCont->Dset_Mapping->RangeTable.c04",
3413 NULL };
3414 SUMA_ENTRY;
3415
3416 SS = SUMA_StringAppend (NULL, NULL);
3417
3418 k = 0;
3419 while (worder[k]) {
3420 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3421 if (!shh || strstr(sii, shh)) {/* help same as hint */
3422 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3423 } else {
3424 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3425 s, shh?shh:"");
3426 }
3427 SUMA_ifree(sii); SUMA_ifree(shh);
3428 ++k;
3429 }
3430
3431 SUMA_SS2S(SS, s);
3432
3433 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3434 }
3435
SUMA_Snap_AllVolCont(char * froot)3436 void SUMA_Snap_AllVolCont (char *froot)
3437 {
3438 static char FuncName[]={"SUMA_Snap_AllVolCont"};
3439 char *s = NULL, *shh=NULL, *sii=NULL;
3440 int k=0;
3441 SUMA_ALL_DO *ado=NULL;
3442 SUMA_X_SurfCont *SurfCont=NULL;
3443
3444 SUMA_ENTRY;
3445
3446 ado = SUMA_findany_ADO_WithSurfContWidget(NULL, VO_type);
3447 if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURNe;
3448 if (!SUMA_viewSurfaceCont(NULL, ado, NULL)) {
3449 SUMA_S_Err("No viewer could be opened for %s", ADO_LABEL(ado));
3450 SUMA_RETURNe;
3451 }
3452
3453 if (!froot) froot = "VolCont";
3454
3455 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3456 ISQ_snapfile2 ( SurfCont->Mainform, s); SUMA_ifree(s);
3457
3458 s = SUMA_append_replace_string(froot, "Disp_Cont.jpg",".", 0);
3459 ISQ_snapfile2 ( SurfCont->DispFrame, s); SUMA_ifree(s);
3460
3461 s = SUMA_append_replace_string(froot, "Volume_Properties.jpg",".", 0);
3462 ISQ_snapfile2 ( SurfCont->SurfFrame, s); SUMA_ifree(s);
3463
3464 s = SUMA_append_replace_string(froot, "Xhair_Info.jpg",".", 0);
3465 ISQ_snapfile2 ( SurfCont->Xhair_fr, s); SUMA_ifree(s);
3466
3467 s = SUMA_append_replace_string(froot, "Slice_Controls.jpg",".", 0);
3468 ISQ_snapfile2 ( SurfCont->Slice_fr, s); SUMA_ifree(s);
3469
3470 s = SUMA_append_replace_string(froot, "Volume_Rendering_Controls.jpg",".", 0);
3471 ISQ_snapfile2 ( SurfCont->VR_fr, s); SUMA_ifree(s);
3472
3473 s = SUMA_append_replace_string(froot, "Dset_Controls.jpg",".", 0);
3474 ISQ_snapfile2 ( SurfCont->ColPlane_fr, s); SUMA_ifree(s);
3475
3476 s = SUMA_append_replace_string(froot, "Dset_Mapping.jpg",".", 0);
3477 ISQ_snapfile2 ( SurfCont->DsetMap_fr, s); SUMA_ifree(s);
3478
3479 SUMA_RETURNe;
3480 }
3481
3482
SUMA_Help_AllMaskCont(TFORM targ)3483 char * SUMA_Help_AllMaskCont (TFORM targ)
3484 {
3485 static char FuncName[]={"SUMA_Help_AllMaskCont"};
3486 char *s = NULL, *shh=NULL, *sii=NULL;
3487 int k=0;
3488 SUMA_STRING *SS = NULL;
3489 char *worder[] = {"MaskCont",
3490 "MaskCont->Masks",
3491 "MaskCont->Masks->Mask_Eval",
3492 "MaskCont->Masks->Mask_Eval.r00",
3493 "MaskCont->Masks->Mask_Eval->v",
3494 "MaskCont->Masks->Tract_Length",
3495 "MaskCont->Masks->Tract_Length.r00",
3496 "MaskCont->Masks->Tract_Length->v",
3497 "MaskCont->Masks->Table",
3498 "MaskCont->Masks->Table.c00",
3499 "MaskCont->Masks->Table.c01",
3500 "MaskCont->Masks->Table.c02",
3501 "MaskCont->Masks->Table.c03",
3502 "MaskCont->Masks->Table.c04",
3503 "MaskCont->Masks->Table.c05",
3504 "MaskCont->Masks->Table.c06",
3505 "MaskCont->Masks->Table.c07",
3506 "MaskCont->Masks->Table.c08",
3507 "MaskCont->Masks->Table.c09",
3508 "MaskCont->Masks->Load_Masks",
3509 "MaskCont->Masks->Save_Masks",
3510 NULL };
3511 SUMA_ENTRY;
3512
3513 SS = SUMA_StringAppend (NULL, NULL);
3514
3515 k = 0;
3516 while (worder[k]) {
3517 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3518 if (!shh || strstr(sii, shh)) {/* help same as hint */
3519 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3520 } else {
3521 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3522 s, shh?shh:"");
3523 }
3524 SUMA_ifree(sii); SUMA_ifree(shh);
3525 ++k;
3526 }
3527
3528 SUMA_SS2S(SS, s);
3529
3530 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3531 }
3532
3533
SUMA_Snap_AllMaskCont(char * froot)3534 void SUMA_Snap_AllMaskCont (char *froot)
3535 {
3536 static char FuncName[]={"SUMA_Snap_AllMaskCont"};
3537 char *s = NULL, *shh=NULL, *sii=NULL;
3538 int k=0;
3539 SUMA_ALL_DO *ado=NULL;
3540 SUMA_X_SurfCont *SurfCont=NULL;
3541
3542 SUMA_ENTRY;
3543
3544 ado = SUMA_findany_ADO_WithSurfContWidget(NULL, MASK_type);
3545 if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURNe;
3546 if (!SUMA_viewSurfaceCont(NULL, ado, NULL)) {
3547 SUMA_S_Err("No viewer could be opened for %s", ADO_LABEL(ado));
3548 SUMA_RETURNe;
3549 }
3550
3551 if (!froot) froot = "TractCont";
3552
3553 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3554 ISQ_snapfile2 ( SurfCont->Mainform, s); SUMA_ifree(s);
3555
3556 s = SUMA_append_replace_string(froot, "Disp_Cont.jpg",".", 0);
3557 ISQ_snapfile2 ( SurfCont->DispFrame, s); SUMA_ifree(s);
3558
3559 s = SUMA_append_replace_string(froot, "Masks.jpg",".", 0);
3560 ISQ_snapfile2 ( SurfCont->SurfFrame, s); SUMA_ifree(s);
3561
3562 SUMA_RETURNe;
3563 }
3564
SUMA_Help_AllTractCont(TFORM targ)3565 char * SUMA_Help_AllTractCont (TFORM targ)
3566 {
3567 static char FuncName[]={"SUMA_Help_AllTractCont"};
3568 char *s = NULL, *shh=NULL, *sii=NULL;
3569 int k=0;
3570 SUMA_STRING *SS = NULL;
3571 char *worder[] = {"TractCont",
3572 "TractCont->Tract_Properties",
3573 "TractCont->Tract_Properties->more",
3574 "TractCont->Xhair_Info",
3575 "TractCont->Xhair_Info->Xhr",
3576 "TractCont->Xhair_Info->Xhr.r00",
3577 "TractCont->Xhair_Info->Ind",
3578 "TractCont->Xhair_Info->Ind.r00",
3579 "TractCont->Xhair_Info->BTP",
3580 "TractCont->Xhair_Info->BTP.r00",
3581 "TractCont->Xhair_Info->Val",
3582 "TractCont->Xhair_Info->Val.c00",
3583 "TractCont->Xhair_Info->Lbl",
3584 "TractCont->Xhair_Info->Lbl.r00",
3585 "TractCont->Coloring_Controls",
3586 "TractCont->Coloring_Controls->Lbl",
3587 "TractCont->Coloring_Controls->Lbl.r00",
3588 "TractCont->Coloring_Controls->Dim",
3589 "TractCont->Coloring_Controls->Ord",
3590 "TractCont->Coloring_Controls->1",
3591 "TractCont->Coloring_Controls->Opa",
3592 "TractCont->Coloring_Controls->Ln",
3593 "TractCont->Coloring_Controls->Masks",
3594 "TractCont->Coloring_Controls->Hde",
3595 "TractCont->Coloring_Controls->Gry",
3596 "TractCont->Coloring_Controls->Switch_Dset",
3597 "Mask_Manipulation_Mode",
3598 NULL };
3599 SUMA_ENTRY;
3600
3601 SS = SUMA_StringAppend (NULL, NULL);
3602
3603 k = 0;
3604 while (worder[k]) {
3605 s = SUMA_gsf(worder[k], targ, &sii, &shh);
3606 if (!shh || strstr(sii, shh)) {/* help same as hint */
3607 SS = SUMA_StringAppend_va(SS, "%s\n", s);
3608 } else {
3609 SS = SUMA_StringAppend_va(SS, "%s\n%s\n",
3610 s, shh?shh:"");
3611 }
3612 SUMA_ifree(sii); SUMA_ifree(shh);
3613 ++k;
3614 }
3615
3616 SUMA_SS2S(SS, s);
3617
3618 SUMA_RETURN(SUMA_Sphinx_String_Edit(&s, targ, 0));
3619 }
3620
SUMA_Snap_AllTractCont(char * froot)3621 void SUMA_Snap_AllTractCont (char *froot)
3622 {
3623 static char FuncName[]={"SUMA_Snap_AllTractCont"};
3624 char *s = NULL, *shh=NULL, *sii=NULL;
3625 int k=0;
3626 SUMA_ALL_DO *ado=NULL;
3627 SUMA_X_SurfCont *SurfCont=NULL;
3628
3629 SUMA_ENTRY;
3630
3631 ado = SUMA_findany_ADO_WithSurfContWidget(NULL, TRACT_type);
3632 if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURNe;
3633 if (!SUMA_viewSurfaceCont(NULL, ado, NULL)) {
3634 SUMA_S_Err("No viewer could be opened for %s", ADO_LABEL(ado));
3635 SUMA_RETURNe;
3636 }
3637
3638 if (!froot) froot = "TractCont";
3639
3640 s = SUMA_append_replace_string(froot, "ALL.jpg",".", 0);
3641 ISQ_snapfile2 ( SurfCont->Mainform, s); SUMA_ifree(s);
3642
3643 s = SUMA_append_replace_string(froot, "Disp_Cont.jpg",".", 0);
3644 ISQ_snapfile2 ( SurfCont->DispFrame, s); SUMA_ifree(s);
3645
3646 s = SUMA_append_replace_string(froot, "Tract_Properties.jpg",".", 0);
3647 ISQ_snapfile2 ( SurfCont->SurfFrame, s); SUMA_ifree(s);
3648
3649 s = SUMA_append_replace_string(froot, "Xhair_Info.jpg",".", 0);
3650 ISQ_snapfile2 ( SurfCont->Xhair_fr, s); SUMA_ifree(s);
3651
3652 s = SUMA_append_replace_string(froot, "Coloring_Controls.jpg",".", 0);
3653 ISQ_snapfile2 ( SurfCont->ColPlane_fr, s); SUMA_ifree(s);
3654
3655 SUMA_RETURNe;
3656 }
3657
3658