00001 #ifndef SUMA_DISPLAY_INCLUDED
00002 #define SUMA_DISPLAY_INCLUDED
00003
00004 typedef struct suma_menu_item {
00005 char *label;
00006 WidgetClass *class;
00007 char mnemonic;
00008 char *accelerator;
00009 char *accel_text;
00010 void (*callback)();
00011 XtPointer callback_data;
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 struct suma_menu_item *subitems;
00027 } SUMA_MenuItem;
00028
00029
00030
00031 typedef struct {
00032 XtPointer callback_data;
00033 void *ContID;
00034 } SUMA_MenuCallBackData;
00035
00036
00037
00038
00039
00040
00041
00042
00043 #define SUMA_VIEWER_FROM_FILEMENU_CALLBACK(data, isv, widtype) {\
00044 SUMA_MenuCallBackData *datap; \
00045 datap = (SUMA_MenuCallBackData *)data; \
00046 isv = (int)datap->ContID; \
00047 widtype = (int)datap->callback_data; }
00048
00049
00050 #define SUMA_VIEWER_FROM_VIEWMENU_CALLBACK(data, isv, widtype) {\
00051 SUMA_MenuCallBackData *datap; \
00052 datap = (SUMA_MenuCallBackData *)data; \
00053 isv = (int)datap->ContID; \
00054 widtype = (int)datap->callback_data; }
00055
00056
00057 #define SUMA_SET_SELECT_COLOR(m_w) {\
00058 Pixel m_fg_pix; \
00059 XtVaGetValues (m_w, XmNforeground, &m_fg_pix, NULL); \
00060 XtVaSetValues (m_w, XmNselectColor, m_fg_pix, NULL); \
00061 }
00062
00063
00064 #define SUMA_SET_LABEL(m_w, m_s) {\
00065 XmString m_str = XmStringCreateLocalized(m_s); \
00066 XtVaSetValues (m_w, XmNlabelString, m_str, NULL); \
00067 XmStringFree (m_str); \
00068 }
00069
00070
00071 #define SUMA_SET_LABEL_MAX(m_w, m_s, m_max) {\
00072 char m_tmp = '\0'; \
00073 XmString m_str ; \
00074 if (strlen(m_s) >= m_max) { m_tmp = m_s[m_max-1]; m_s[m_max-1] = '\0'; } \
00075 m_str = XmStringCreateLocalized(m_s); \
00076 XtVaSetValues (m_w, XmNlabelString, m_str, NULL); \
00077 XmStringFree (m_str); \
00078 if (m_tmp != '\0') m_s[m_max-1] = m_tmp; \
00079 }
00080
00081 #define SUMA_SET_TEXT_FIELD(m_w, m_s) {\
00082 XtVaSetValues (m_w, XmNvalue, m_s, NULL); \
00083 }
00084
00085
00086
00087 #define SUMA_GET_TEXT_FIELD(m_w, m_s) {\
00088 void *n; \
00089 XtVaGetValues (m_w, XmNvalue, &n, NULL); \
00090 m_s = (char *)n; \
00091 }
00092
00093 #define SUMA_SET_GL_PROJECTION(csv) { \
00094 if (!csv->ortho) { \
00095 if (LocalHead) fprintf (SUMA_STDOUT,"%s: Setting up matrix mode and perspective ...\n", FuncName); \
00096 glMatrixMode (GL_PROJECTION); \
00097 glLoadIdentity (); \
00098 gluPerspective((GLdouble)csv->FOV[csv->iState], csv->Aspect, SUMA_PERSPECTIVE_NEAR, SUMA_PERSPECTIVE_FAR); \
00099 } else { \
00100 GLdouble m_sz = 0.5 *tan(SUMA_PI * csv->FOV[csv->iState] / 180.0)*csv->GVS[csv->StdView].ViewFrom[2]; \
00101 GLdouble m_szx = m_sz * csv->Aspect; \
00102 GLdouble m_szy = m_sz ; \
00103 if (LocalHead) fprintf (SUMA_STDOUT,"%s: Setting up matrix mode and orthographic projection (m_szx = %g, m_szy=%g)...\n", FuncName, m_szx, m_szy); \
00104 glMatrixMode (GL_PROJECTION); \
00105 glLoadIdentity (); \
00106 glOrtho( -m_szx, m_szx, \
00107 -m_szy, m_szy, \
00108 SUMA_PERSPECTIVE_NEAR, SUMA_PERSPECTIVE_FAR); \
00109 } \
00110 }
00111
00112 #define SUMA_SET_GL_MODELVIEW(csv) { \
00113 if (LocalHead) { \
00114 int m_i; \
00115 fprintf(stdout,"Translation Vector: %f %f\n", \
00116 csv->GVS[csv->StdView].translateVec[0], csv->GVS[csv->StdView].translateVec[1]); \
00117 fprintf(stdout,"Rotation Matrix:\n"); \
00118 for (m_i=0; m_i<4; ++m_i){ fprintf(stdout, "%f\t%f\t%f\t%f\n", \
00119 rotationMatrix[m_i][0], rotationMatrix[m_i][1], rotationMatrix[m_i][2], rotationMatrix[m_i][3]); } \
00120 } \
00121 glMatrixMode(GL_MODELVIEW); \
00122 glPushMatrix(); \
00123 glTranslatef (csv->GVS[csv->StdView].translateVec[0], csv->GVS[csv->StdView].translateVec[1], 0.0); \
00124 glTranslatef (csv->GVS[csv->StdView].RotaCenter[0], csv->GVS[csv->StdView].RotaCenter[1], csv->GVS[csv->StdView].RotaCenter[2]); \
00125 glMultMatrixf(&rotationMatrix[0][0]); \
00126 glTranslatef (-csv->GVS[csv->StdView].RotaCenter[0], -csv->GVS[csv->StdView].RotaCenter[1], -csv->GVS[csv->StdView].RotaCenter[2]); \
00127 }
00128
00129
00130 #define SUMA_MARGIN 1
00131
00132 String *SUMA_get_fallbackResources ();
00133 Boolean SUMA_handleRedisplay (XtPointer w);
00134 void SUMA_postRedisplay(Widget w, XtPointer clientData, XtPointer call);
00135 void SUMA_display(SUMA_SurfaceViewer *csv, SUMA_DO *dov);
00136 Colormap SUMA_getShareableColormap_Eng(XVisualInfo * vi, Display *dpy);
00137 Colormap SUMA_getShareableColormap(SUMA_SurfaceViewer * csv);
00138 void SUMA_graphicsInit(Widget w, XtPointer clientData, XtPointer call);
00139 void SUMA_expose(Widget w, XtPointer clientData, XtPointer call);
00140 void SUMA_resize(Widget w, XtPointer clientData, XtPointer call);
00141 SUMA_Boolean SUMA_X_SurfaceViewer_Create (void);
00142 void SUMA_ButtOpen_pushed (Widget w, XtPointer cd1, XtPointer cd2);
00143 void SUMA_ButtClose_pushed (Widget w, XtPointer cd1, XtPointer cd2);
00144 int SUMA_generateEPS(char *filename, int inColor, unsigned int width, unsigned int height);
00145 GLvoid *SUMA_grabPixels(int inColor, unsigned int width, unsigned int height);
00146 SUMA_Boolean SUMA_RenderToPixMap (SUMA_SurfaceViewer *csv, SUMA_DO* dov);
00147 void SUMA_context_Init(SUMA_SurfaceViewer *sv);
00148 SUMA_Boolean SUMA_GetSelectionLine (SUMA_SurfaceViewer *sv, int x, int y, GLdouble *Pick0, GLdouble *Pick1,
00149 int N_List, int *xList, int *yList, GLdouble *Pick0List);
00150 void SUMA_cb_viewSurfaceCont(Widget w, XtPointer data, XtPointer callData);
00151 void SUMA_cb_viewViewerCont(Widget w, XtPointer data, XtPointer callData);
00152 void SUMA_cb_toggle_crosshair(Widget w, XtPointer data, XtPointer callData);
00153 void SUMA_cb_toggle_node_in_focus(Widget w, XtPointer data, XtPointer callData);
00154 void SUMA_cb_toggle_selected_faceset(Widget w, XtPointer data, XtPointer callData);
00155 void SUMA_cb_viewSumaCont(Widget w, XtPointer data, XtPointer callData);
00156 void SUMA_cb_createSumaCont(Widget w, XtPointer data, XtPointer callData);
00157 void SUMA_cb_closeSumaCont(Widget w, XtPointer data, XtPointer callData);
00158 Widget SUMA_GetTopShell(Widget w);
00159 void SUMA_cb_createViewerCont(Widget w, XtPointer data, XtPointer callData);
00160 void SUMA_cb_closeViewerCont(Widget w, XtPointer data, XtPointer callData);
00161 void SUMA_cb_XHlock_toggled(Widget w, XtPointer data, XtPointer callData);
00162 void SUMA_cb_XHviewlock_toggled(Widget w, XtPointer data, XtPointer callData);
00163 void SUMA_cb_closeSurfaceCont(Widget w, XtPointer data, XtPointer callData);
00164 void SUMA_cb_createSurfaceCont(Widget w, XtPointer data, XtPointer callData);
00165 void SUMA_cb_newSumaCont(Widget w, XtPointer client_data, XtPointer callData);
00166 void SUMA_cb_doneSumaCont(Widget wcall, XtPointer cd1, XtPointer cbs);
00167 void SUMA_quit_timeout_CB( XtPointer client_data , XtIntervalId * id );
00168 void SUMA_set_Lock_rb (SUMA_rb_group * Lock_rbg, int irb, int but);
00169 void SUMA_set_Lock_arb (SUMA_rb_group * Lock_rbg);
00170 void SUMA_cb_XHaviewlock_toggled (Widget w, XtPointer client_data, XtPointer callData);
00171 void SUMA_cb_XHalock_toggled (Widget w, XtPointer client_data, XtPointer callData);
00172 void SUMA_set_LockView_atb (void);
00173 int SUMA_BuildMenu(Widget parent, int menu_type, char *menu_title, char menu_mnemonic, \
00174 SUMA_Boolean tear_off, SUMA_MenuItem *items, void *ContID,
00175 char *hint, char *help,
00176 Widget *MenuWidgets);
00177 void SUMA_cb_FileOpenSpec (Widget w, XtPointer client_data, XtPointer callData);
00178 void SUMA_cb_FileOpenSurf (Widget w, XtPointer client_data, XtPointer callData);
00179 void SUMA_cb_FileClose (Widget w, XtPointer client_data, XtPointer callData);
00180 void SUMA_cb_FileSaveView (Widget w, XtPointer client_data, XtPointer callData);
00181 void SUMA_cb_FileLoadView (Widget w, XtPointer client_data, XtPointer callData);
00182 void SUMA_cb_moreSumaInfo (Widget w, XtPointer client_data, XtPointer callData);
00183 void SUMA_cb_moreSurfInfo (Widget w, XtPointer client_data, XtPointer callData);
00184 void SUMA_cb_moreViewerInfo (Widget w, XtPointer client_data, XtPointer callData);
00185 void SUMA_ViewerInfo_destroyed (void *p);
00186 void SUMA_ViewerInfo_open (void *p);
00187 void SUMA_SumaInfo_destroyed (void *p);
00188 void SUMA_SumaInfo_open (void *p);
00189 SUMA_CREATE_TEXT_SHELL_STRUCT * SUMA_CreateTextShellStruct (void (*opencallback)(void *data), void *opendata,
00190 void (*closecallback)(void*data), void *closedata);
00191 SUMA_CREATE_TEXT_SHELL_STRUCT * SUMA_CreateTextShell (char *s, char *title, SUMA_CREATE_TEXT_SHELL_STRUCT *TextShellStruct);
00192 void SUMA_cb_search_text(Widget widget, XtPointer client_data, XtPointer call_data);
00193 void SUMA_DestroyTextShell (Widget w, XtPointer ud, XtPointer cd);
00194 void SUMA_SurfInfo_open (void *SO);
00195 void SUMA_SurfInfo_destroyed (void *SO);
00196 void SUMA_cb_ToggleCaseSearch (Widget widget, XtPointer client_data, XtPointer call_data);
00197 void SUMA_cb_helpUsage (Widget w, XtPointer data, XtPointer callData);
00198 void SUMA_cb_helpIO_notify(Widget w, XtPointer data, XtPointer callData);
00199 void SUMA_cb_helpMemTrace(Widget w, XtPointer data, XtPointer callData);
00200 char * SUMA_FormatMessage (SUMA_MessageData *MD);
00201 void SUMA_PopUpMessage (SUMA_MessageData *MD);
00202 void SUMA_cb_helpMessageLog (Widget w, XtPointer data, XtPointer callData);
00203 void SUMA_cb_helpSUMAGlobal (Widget w, XtPointer data, XtPointer callData);
00204 void SUMA_cb_helpViewerStruct (Widget w, XtPointer data, XtPointer callData);
00205 void SUMA_cb_helpSurfaceStruct (Widget w, XtPointer data, XtPointer callData);
00206 void SUMA_cb_SetRenderMode(Widget widget, XtPointer client_data, XtPointer call_data);
00207 void SUMA_cb_ToolsDrawROI (Widget w, XtPointer client_data, XtPointer call_data);
00208 void SUMA_cb_CloseDrawROIWindow(Widget w, XtPointer client_data, XtPointer call_data);
00209 void SUMA_CreateDrawROIWindow(void);
00210 SUMA_Boolean SUMA_InitializeDrawROIWindow (SUMA_DRAWN_ROI *DrawnROI);
00211 SUMA_Boolean SUMA_OpenDrawROIWindow (SUMA_DRAWN_ROI *DrawnROI);
00212 void SUMA_cb_DrawROImode_toggled (Widget w, XtPointer data, XtPointer call_data);
00213 void SUMA_cb_DrawROIPen_toggled (Widget w, XtPointer data, XtPointer call_data);
00214 void SUMA_cb_AfniLink_toggled (Widget w, XtPointer data, XtPointer call_data);
00215 void SUMA_cb_DrawROI_Undo (Widget w, XtPointer data, XtPointer client_data);
00216 void SUMA_cb_DrawROI_Redo (Widget w, XtPointer data, XtPointer client_data);
00217 void SUMA_cb_DrawROI_Save (Widget w, XtPointer data, XtPointer client_data);
00218 void SUMA_cb_DrawROI_Load (Widget w, XtPointer data, XtPointer client_data);
00219 void SUMA_cb_DrawROI_setlabel (Widget w, XtPointer data, XtPointer client_data);
00220 void SUMA_CreateArrowField ( Widget pw, char *label,
00221 float value, float vmin, float vmax, float vstep,
00222 int cwidth, SUMA_VARTYPE type,
00223 SUMA_Boolean wrap,
00224 void (*NewValueCallback)(void * data), void *cb_data,
00225 char *hint, char *help,
00226 SUMA_ARROW_TEXT_FIELD *AF);
00227 void SUMA_CreateTextField ( Widget pw, char *label,
00228 int cwidth,
00229 void (*NewValueCallback)(void *data),
00230 char *hint, char *help,
00231 SUMA_ARROW_TEXT_FIELD *AF);
00232 void SUMA_DrawROI_NewLabel (void * data);
00233 void SUMA_ATF_change_value (XtPointer client_data, XtIntervalId *id);
00234 void SUMA_ATF_start_stop (Widget w, XtPointer client_data, XtPointer call_data);
00235 void SUMA_DrawROI_NewValue (void * data);
00236 void SUMA_ATF_cb_label_change (Widget w, XtPointer client_data, XtPointer call_data);
00237 void SUMA_ATF_SetString (SUMA_ARROW_TEXT_FIELD * AF);
00238 void SUMA_ATF_SetValue (SUMA_ARROW_TEXT_FIELD * AF);
00239 void SUMA_ATF_cb_label_Modify (Widget w, XtPointer client_data, XtPointer call_data);
00240 void SUMA_leave_EV( Widget w , XtPointer client_data ,
00241 XEvent * ev , Boolean * continue_to_dispatch );
00242 void SUMA_ATF_cb_label_Focus (Widget w, XtPointer client_data, XtPointer call_data);
00243 void SUMA_PositionWindowRelative (Widget New, Widget Ref, SUMA_WINDOW_POSITION Loc);
00244 void SUMA_cb_DrawROI_Finish (Widget w, XtPointer data, XtPointer client_data);
00245 void SUMA_cb_DrawROI_Join (Widget w, XtPointer data, XtPointer client_data);
00246 void SUMA_cb_DrawROI_SwitchROI (Widget w, XtPointer data, XtPointer call_data);
00247 void SUMA_cb_DrawROI_Delete(Widget wcall, XtPointer cd1, XtPointer cbs);
00248 void SUMA_delete_timeout_CB( XtPointer client_data , XtIntervalId * id );
00249 SUMA_LIST_WIDGET * SUMA_FreeScrolledList (SUMA_LIST_WIDGET *LW);
00250 SUMA_LIST_WIDGET * SUMA_AllocateScrolledList (char *Label, int SelectPolicy,
00251 SUMA_Boolean RemoveDups, SUMA_Boolean ShowSorted,
00252 Widget PosRef, SUMA_WINDOW_POSITION Pos,
00253 void (*Default_cb)(Widget w, XtPointer data, XtPointer calldata), void *DefaultData,
00254 void (*Select_cb)(Widget w, XtPointer data, XtPointer calldata), void *SelectData,
00255 void (*CloseList_cb)(Widget w, XtPointer data, XtPointer calldata), void *CloseListData);
00256 SUMA_Boolean SUMA_UpdateScrolledListData(SUMA_LIST_WIDGET *LW, void *Default_Data, void *Select_Data, void *CloseList_Data);
00257 void SUMA_CreateScrolledList ( char **clist, int N_clist, SUMA_Boolean Partial,
00258 SUMA_LIST_WIDGET *LW);
00259 void SUMA_cb_CloseSwitchROI(Widget w, XtPointer data, XtPointer call_data);
00260 void SUMA_cb_SelectSwitchROI(Widget w, XtPointer data, XtPointer call_data);
00261 void SUMA_FileSelection_popdown_cb (Widget w, XtPointer client_data, XtPointer call_data);
00262 void SUMA_FileSelection_file_select_cb(Widget dialog, XtPointer client_data, XtPointer call_data);
00263 SUMA_SELECTION_DIALOG_STRUCT *SUMA_CreateFileSelectionDialog (char *title, SUMA_SELECTION_DIALOG_STRUCT **dlg);
00264 SUMA_SELECTION_DIALOG_STRUCT *SUMA_CreateFileSelectionDialogStruct (Widget daddy, SUMA_FILE_SELECT_MODE Mode, SUMA_Boolean preserve,
00265 void (*SelectCallback)(char *filename, void *data), void *SelectData,
00266 void (*CancelCallback)(void *data), void *CancelData,
00267 char *FilePattern,
00268 SUMA_SELECTION_DIALOG_STRUCT *dlg);
00269 void SUMA_FileSelection_Unmap_cb (Widget w, XtPointer client_data, XtPointer call_data);
00270 void SUMA_FreeFileSelectionDialogStruct(SUMA_SELECTION_DIALOG_STRUCT *dlg);
00271 SUMA_PROMPT_DIALOG_STRUCT *SUMA_CreatePromptDialogStruct (SUMA_PROMPT_MODE Mode, char *TextFieldLabel,
00272 char *init_selection,
00273 Widget daddy, SUMA_Boolean preserve,
00274 SUMA_PROMPT_BUTTONS Return_button,
00275 void(*SelectCallback)(char *selection, void *data), void *SelectData,
00276 void(*CancelCallback)(void *data), void *CancelData,
00277 void(*HelpCallback)(void *data), void *HelpData,
00278 int(*VerifyFunction)(char *selection, void *data), void *VerifyData,
00279 SUMA_PROMPT_DIALOG_STRUCT *oprmpt);
00280 SUMA_PROMPT_DIALOG_STRUCT *SUMA_CreatePromptDialog(char *title_extension, SUMA_PROMPT_DIALOG_STRUCT *prmpt);
00281 const char * SUMA_PromptButtonLabel(SUMA_PROMPT_BUTTONS code);
00282 SUMA_Boolean SUMA_CreatePromptActionArea (SUMA_PROMPT_DIALOG_STRUCT *prmpt);
00283 void SUMA_PromptOk_cb (Widget w, XtPointer data, XtPointer calldata);
00284 void SUMA_PromptClear_cb (Widget w, XtPointer data, XtPointer calldata);
00285 void SUMA_PromptApply_cb (Widget w, XtPointer data, XtPointer calldata);
00286 void SUMA_PromptCancel_cb (Widget w, XtPointer data, XtPointer calldata);
00287 void SUMA_PromptHelp_cb (Widget w, XtPointer data, XtPointer calldata);
00288 void SUMA_PromptActivate_cb (Widget w, XtPointer data, XtPointer calldata);
00289 void SUMA_PromptUnmap_cb (Widget w, XtPointer data, XtPointer calldata);
00290 void SUMA_FreePromptDialogStruct(SUMA_PROMPT_DIALOG_STRUCT *prmpt);
00291 void SUMA_cb_UnmanageWidget(Widget w, XtPointer data, XtPointer client_data);
00292 void SUMA_ColPlane_NewOrder (void *data);
00293 void SUMA_ColPlane_NewOpacity (void *data);
00294 void SUMA_ColPlane_NewDimFact (void *data);
00295 void SUMA_cb_ColPlaneShow_toggled (Widget w, XtPointer data, XtPointer client_data);
00296 void SUMA_cb_ColPlaneShowOne_toggled (Widget w, XtPointer data, XtPointer client_data);
00297 void SUMA_cb_ColPlane_Delete(Widget w, XtPointer data, XtPointer client_data);
00298 void SUMA_cb_ColPlane_Load(Widget w, XtPointer data, XtPointer client_data);
00299 void SUMA_cb_Dset_Load(Widget w, XtPointer data, XtPointer client_data);
00300 void SUMA_cb_SurfCont_SwitchColPlane(Widget w, XtPointer data, XtPointer client_data);
00301 void SUMA_cb_CloseSwitchColPlane(Widget w, XtPointer data, XtPointer call_data);
00302 void SUMA_cb_SelectSwitchColPlane(Widget w, XtPointer data, XtPointer call_data);
00303 void SUMA_cb_ViewerCont_SwitchState (Widget w, XtPointer data, XtPointer call_data);
00304 void SUMA_cb_ViewerCont_SwitchGroup (Widget w, XtPointer data, XtPointer call_data);
00305 void SUMA_cb_SelectSwitchGroup(Widget w, XtPointer data, XtPointer call_data);
00306 void SUMA_cb_CloseSwitchGroup(Widget w, XtPointer data, XtPointer call_data);
00307 SUMA_Boolean SUMA_InitializeColPlaneShell(SUMA_SurfaceObject *SO, SUMA_OVERLAYS *ColPlane);
00308 SUMA_Boolean SUMA_UpdateColPlaneShellAsNeeded(SUMA_SurfaceObject *SO);
00309 SUMA_Boolean SUMA_RemixRedisplay (SUMA_SurfaceObject *SO);
00310 void SUMA_cb_SetDrawROI_SaveMode(Widget w, XtPointer data, XtPointer call_data);
00311 void SUMA_cb_SetDrawROI_SaveWhat(Widget w, XtPointer data, XtPointer call_data);
00312 void SUMA_response(Widget widget, XtPointer client_data, XtPointer call_data);
00313 int SUMA_ForceUser_YesNo(Widget parent, char *question, int default_ans, SUMA_WINDOW_POSITION pos);
00314 int AskUser(Widget parent, char *question, char *ans1, char *ans2, int default_ans);
00315 char * SUMA_ClassOf(int c);
00316 char * SUMA_Format(int n, int w);
00317 void SUMA_ShowAllVisuals (void);
00318 int SUMA_ShowVisual (Display *dpy, XVisualInfo *vi, SUMA_Boolean ShowHead);
00319 int SUMA_AskUser_File_replace(Widget parent, char *question, int default_ans);
00320 void SUMA_WidgetResize (Widget New, int width, int height);
00321 void SUMA_LoadVisualState(char *fname, void *csvp);
00322 void SUMA_SaveVisualState(char *fname, void *csvp);
00323 void SUMA_LoadSegDO (char *s, void *csvp);
00324 void SUMA_SiSi_I_Insist(void);
00325 void SUMA_BuildMenuReset(int nchar);
00326 SUMA_Boolean SUMA_Init_SurfCont_SurfParam(SUMA_SurfaceObject *SO);
00327 SUMA_Boolean SUMA_World2ScreenCoords (SUMA_SurfaceViewer *sv, int N_List, double *WorldList,
00328 double *ScreenList, int *Quad, SUMA_Boolean ApplyXform);
00329 SUMA_Boolean SUMA_DrawWindowLine(SUMA_SurfaceViewer *sv, int x0, int y0, int x1, int y1, int meth);
00330 void SUMA_cb_SetDrawROI_WhatDist(Widget widget, XtPointer client_data, XtPointer call_data);
00331
00332
00333
00334 #define SUMA_DrawROI_ParentLabel_help \
00335 "Label of the ROI's parent surface."
00336
00337 #define SUMA_DrawROI_DrawROIMode_help\
00338 "Toggles ROI drawing mode.\n" \
00339 "If turned on, then drawing is enabled \n" \
00340 "and the cursor changes to a target. \n" \
00341 "To draw, use the right mouse button. \n" \
00342 "If you want to pick a node without causing \n" \
00343 "a drawing action, use shift+right button."
00344
00345 #define SUMA_DrawROI_PenMode_help\
00346 "Toggles Pen drawing mode\n"\
00347 "If turned on, the cursor changes shape to a pen. \n" \
00348 "In the pen mode, drawing is done with button 1. \n" \
00349 "This is for coherence with AFNI's pen drawing mode, \n" \
00350 "which is meant to work pleasantly with a stylus directly \n" \
00351 "on the screen. In pen mode, you draw with the left mouse \n" \
00352 "button and move the surface with the right button. \n" \
00353 "To pick a node, use shift+left button. \n" \
00354 "Pen mode only works when Draw Mode is enabled."
00355
00356 #define SUMA_DrawROI_AfniLink_help\
00357 "Toggles Afni Link for ROI drawing.\n" \
00358 "If turned on, then ROIs drawn on the surface are\n" \
00359 "sent to AFNI. \n" \
00360 "Surface ROIs that are sent to AFNI are turned\n" \
00361 "into volume ROIs (VOIs) on the fly and displayed \n" \
00362 "in a functional volume with the same colormap used in SUMA.\n" \
00363 "The mapping from the surface domain (ROI) to the volume \n" \
00364 "domain (VOI) is done by intersection of the first with \n" \
00365 "the latter. The volume used for the VOI has the same \n" \
00366 "resolution (grid) as the Surface Volume (-sv option) \n" \
00367 "used when launching SUMA. The color map used for ROIs \n" \
00368 "is set by the environment variable SUMA_ROIColorMap."
00369
00370 #define SUMA_DrawROI_Label_help \
00371 "Label of ROI being drawn.\n" \
00372 "It is very advisable that you use \n" \
00373 "different labels for different ROIs. \n" \
00374 "If you don't, you won't be able to \n" \
00375 "differentiate between them afterwards."
00376
00377 #define SUMA_DrawROI_Value_help \
00378 "Integer value associated with ROI.\n" \
00379 "This value controls the color of the \n" \
00380 "ROI per the ROI colormap."
00381
00382 #define SUMA_DrawROI_Undo_help \
00383 "Undo the last action on the stack."
00384
00385 #define SUMA_DrawROI_Redo_help \
00386 "Redo the last undone action."
00387
00388 #define SUMA_DrawROI_Join_help \
00389 "Join the first node of the ROI to the last,\n" \
00390 "thereby creating a close contour ROI.\n" \
00391 "This is a necessary step before the filling\n" \
00392 "operation. Joining is done by cutting the surface\n" \
00393 "with a plane formed by the two nodes\n" \
00394 "and the projection of the center of your window.\n" \
00395 "You could double click at the last node, if you don't\n" \
00396 "want to use the 'Join' button."
00397
00398 #define SUMA_DrawROI_Finish_help \
00399 "Mark ROI as finished.\n" \
00400 "Allows you to start drawing a new one.\n" \
00401 "Once marked as finished, an ROI's label\n" \
00402 "and value can no longer be changed.\n" \
00403 "To do so, you will need to 'Undo' the \n" \
00404 "finish action."
00405
00406 #define SUMA_DrawROI_SwitchROI_help \
00407 "Allows you to switch between ROIs.\n" \
00408 "This is where you'll suffer if ROIs \n" \
00409 "on topologically isomorphic surfaces \n" \
00410 "share identical labels."
00411
00412 #define SUMA_DrawROI_Load_help \
00413 "Load a Drawn ROI.\n" \
00414 "See BHelp for 'Save' below."
00415
00416 #define SUMA_DrawROI_DeleteROI_help \
00417 "Delete a drawn ROI.\n" \
00418 "This operation is not reversible,\n" \
00419 "(no Undo here) so you'll have to click twice."
00420
00421 #define SUMA_DrawROI_SaveFormat_help \
00422 "File format for saving ROI:\n" \
00423 "Format options are 1D and NIML. \n" \
00424 " The 1D format is the same one used in AFNI. \n" \
00425 "It is an ASCII file with 2 values per line. The first \n" \
00426 "value is a node index, the second is the node's value. \n" \
00427 "Needless, to say, this format does not support the storage \n" \
00428 "of ROI auxiliary information such as Label and \n" \
00429 "Parent Surface, etc... For that you'll have to use NIML.\n" \
00430 " NIML is a whole different story which will be documented \n" \
00431 "(if necessary) in the future. Suffice it to say that in NIML \n" \
00432 "format you can store all the auxiliary information about \n" \
00433 "each ROI, unlike with the .1D format. "
00434
00435 #define SUMA_DrawROI_SaveWhat_help \
00436 "Which ROIs to save?\n" \
00437 " This: saves the current ROI. \n" \
00438 " All: saves all ROIs on surfaces related to the Parent \n" \
00439 " surface of the current ROI."
00440
00441 #define SUMA_DrawROI_WhatDist_help \
00442 "Report length of drawn segments?\n" \
00443 " -----: No distance calculations. \n" \
00444 " trace: Calculate distance along last\n" \
00445 " traced segment.\n" \
00446 " all: In addition to output from\n" \
00447 " 'trace', calculate the shortest\n" \
00448 " distance between the first and \n" \
00449 " last node of the trace.\n" \
00450 " The results are output to the Message Log \n" \
00451 " window (Help --> Message Log) with the following\n" \
00452 " information:\n" \
00453 " n0, n1: Indices of first and last node forming\n" \
00454 " the traced path.\n" \
00455 " N_n: Number of nodes forming the trace.\n" \
00456 " lt: Trace length calculated as the sum\n" \
00457 " of the distances from node to node.\n" \
00458 " This length is a slight overestimation\n" \
00459 " of the geodesic length.\n" \
00460 " Units for all distances is the same as\n" \
00461 " the units for surface coordinates. Usually\n" \
00462 " and hopefully in mm.\n" \
00463 " lt_c: Trace length corrected by a scaling factor\n" \
00464 " from [1] to better approximate geodesic \n" \
00465 " distances. Factor is 2/(1+sqrt(2)).\n" \
00466 " Do not use this factor when N_n is small. \n"\
00467 " Think of the extreme case when N_n is 2.\n" \
00468 " sd: Shortest distance on the mesh (graph) \n" \
00469 " between n0 and n1 using Dijkstra's algorithm.\n" \
00470 " sd_c: Corrected shortest distance as for lt_c.\n" \
00471 "\n" \
00472 " Note 1: sd and sd_c take some time to compute. That is \n" \
00473 " why they are only calculated when you select 'all'.\n" \
00474 " Note 2: The output is formatted to be cut and pasted into\n" \
00475 " a .1D file for ease of processing.\n" \
00476 " You can include all the comment lines that\n" \
00477 " start with '#'. But you cannot combine entries\n" \
00478 " from the output obtained using 'all' option with \n" \
00479 " those from 'trace' since they produce different \n" \
00480 " numbers of values.\n" \
00481 "\n" \
00482 " [1] Fischl et al, Neuroimage 9, 195-207 1999, \n" \
00483 " Cortical Surface-Based Analysis."
00484
00485 #define SUMA_DrawROI_Save_help \
00486 "Save the Drawn ROI to disk.\n" \
00487 "Choose the file format and what is to be\n" \
00488 "saved from the two menus ahead.\n" \
00489 "\n" \
00490 SUMA_DrawROI_SaveFormat_help \
00491 "\n" \
00492 SUMA_DrawROI_SaveWhat_help
00493
00494 #define SUMA_closeDrawROI_help \
00495 "Close Draw ROI window.\n" \
00496 "Current settings are preserved for the \n" \
00497 "next time you reopen this window."
00498
00499
00500
00501 #define SUMA_help_help \
00502 "Click the hand\n" \
00503 "on any button or \n"\
00504 "label, menu, etc. to\n" \
00505 "get a little help."
00506
00507 #define SUMA_closeSumaCont_help \
00508 "Close SUMA controller window.\n" \
00509 "Current settings are preserved\n"\
00510 "when controller is reopened."
00511
00512 #define SUMA_LockSumaCont_help \
00513 "Set the Cross Hair lock \n" \
00514 "between viewers.\n" \
00515 "- No Lock\n" \
00516 "i Node index Lock\n" \
00517 "c Coordinate Lock"
00518
00519 #define SUMA_LockViewSumaCont_help \
00520 "Lock the view point of \n" \
00521 "all viewers."
00522
00523 #define SUMA_viewerSumaCont_help \
00524 "Opens a new Surface viewer window."
00525
00526 #define SUMA_closeSurfaceCont_help \
00527 "Close Surface controller window.\n" \
00528 "Current settings are preserved\n"\
00529 "when controller is reopened.\n"
00530
00531 #define SUMA_closeViewerCont_help \
00532 "Close Viewer controller window.\n" \
00533 "Current settings are preserved\n"\
00534 "when controller is reopened.\n"
00535
00536
00537 #define SUMA_moreViewerInfo_help \
00538 "Opens a dialog with detailed\n" \
00539 "information about the surface\n"\
00540 "viewer.\n"
00541
00542 #define SUMA_SurfCont_ColPlaneDim_hint \
00543 "Dimming factor to apply to colormap." \
00544
00545 #define SUMA_SurfCont_ColPlaneOrder_hint \
00546 "Order of Dset's colorplane." \
00547
00548 #define SUMA_SurfCont_ColPlaneOpacity_hint \
00549 "Opacity of Dset's colorplane." \
00550
00551 #endif