Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suma oct2023 #549

Open
wants to merge 60 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
63a7393
SUMA: Added new button (Alpha) below IxT button on suma surface contr…
OtagoHarbour Oct 28, 2023
049c2cf
SUMA: Added "Alpha Thresh" check box to various locations on SUMA Sur…
OtagoHarbour Oct 31, 2023
9c3f9ed
SUMA: Added "Alpha Thresh" check just below slider on SUMA Surface Co…
OtagoHarbour Oct 31, 2023
212d7fa
SUMA: Added "A" checkbox just above slider on SUMA Surface Controller…
OtagoHarbour Oct 31, 2023
b3675de
SUMA: Allowed "A" checkbox to appear both just above, and just below,…
OtagoHarbour Nov 1, 2023
8bd1fb5
SUMA: Added "B" checkbox both just above, and just below, slider on S…
OtagoHarbour Nov 1, 2023
3d4d920
SUMA: "A" and "B" checkboxes only just above slider on SUMA Surface C…
OtagoHarbour Nov 1, 2023
27e5d2b
SUMA: Added widget variables, for "A" and "B" checkboxes, to SUMA_X_S…
OtagoHarbour Nov 2, 2023
d48d37a
SUMA: Added code so "B" checkbox toggles on clicking.
OtagoHarbour Nov 2, 2023
d6d9332
SUMA: Tidied up code for "A" and "B" checkboxes.
OtagoHarbour Nov 2, 2023
2ea573c
SUMA: Added BHelp for "A" checkbox.
OtagoHarbour Nov 2, 2023
a33efa7
SUMA: Replaced * with x for multiplication in BHelp for "A" checkbox.
OtagoHarbour Nov 2, 2023
8c8090b
SUMA: Added BHelp for "A" checkbox.
OtagoHarbour Nov 3, 2023
8f67a11
SUMA: Corrected BHelp, and improved code comments for "A" and "B" che…
OtagoHarbour Nov 3, 2023
c53b395
SUMA: Added code to make the A"A checkbox reflect the logical status …
OtagoHarbour Nov 6, 2023
fd677db
SUMA: Removed some dead code associated with "A" button
OtagoHarbour Nov 6, 2023
5921cf2
Merge branch 'sumaOct2023' of https://github.com/afni/afni into sumaO…
OtagoHarbour Nov 14, 2023
a8e54c3
SUMA: Fist implementation of "A" checkbox. Several limitations. Can…
OtagoHarbour Nov 17, 2023
9a1d604
SUMA: Fist implementation of "B" checkbox. Threshold boundary looks …
OtagoHarbour Nov 17, 2023
5a57821
SUMA: Added automatic image refresh when "A" or "B" checkbox clicked.
OtagoHarbour Nov 18, 2023
c4ed4ad
SUMA: Fixed bug that was causeing the program to crash. The problem …
OtagoHarbour Nov 20, 2023
09a08a7
SUMA: First pass at getting "A" button implementation working for an …
OtagoHarbour Nov 21, 2023
37771cb
SUMA: Made slight change to fix color problem when "A" button checked.
OtagoHarbour Nov 21, 2023
67ff03b
SUMA: Added options (linear, quadratic and fractional) to opacity mod…
OtagoHarbour Nov 22, 2023
c4e3b35
spelling
mrneont Nov 29, 2023
95ef9af
Merge branch 'master' of https://github.com/afni/afni into sumaOct2023
mrneont Nov 29, 2023
27b52e8
more spelling
mrneont Nov 29, 2023
da18065
SUMA: Improved gray underlay when "A" box checked.
OtagoHarbour Nov 30, 2023
f5aa95b
SUMA: Fixed problem where surface display became much brighter, and o…
OtagoHarbour Dec 1, 2023
ef9f911
SUMA Alpha: Made an adjustment s.t. subthreshold display draws from t…
OtagoHarbour Dec 4, 2023
8f2a459
SUMA Alpha: Deleted some of the commented code that I am pretty sure …
OtagoHarbour Dec 5, 2023
7f92818
SUMA Alpha: Modified so could switch among overlays
OtagoHarbour Dec 6, 2023
db13802
SUMA Alpha: Added freeing up of alphaOpacities. Also modified code s…
OtagoHarbour Dec 6, 2023
bc9bc5b
SUMA Alpha: Fixed opacity function s.t. it used the T vector, instead…
OtagoHarbour Dec 6, 2023
e5489cb
SUMA Alpha: Added code to fix colors when colormwp changed.
OtagoHarbour Dec 12, 2023
0dbda68
SUMA Alpha: Added code s.t. it pays attention to whether "shw 0" chec…
OtagoHarbour Dec 12, 2023
2c4e977
SUMA Alpha: Fixed some code that was causing weird effects on the gra…
OtagoHarbour Dec 12, 2023
f9f0a64
SUMA Alpha: Fixed some code s.t. color based on I:Min/Max edit boxes.
OtagoHarbour Dec 13, 2023
a3a471d
SUMA Alpha: Modified code s.t. it works with switching viewing states…
OtagoHarbour Dec 13, 2023
07f879b
SUMA Alpha: (Possibly) temporary fix for suora-threshold colors chang…
OtagoHarbour Dec 15, 2023
6a0dd4a
SUMA Alpha: Fixed bug where part of brain, where overlay zero, disapp…
OtagoHarbour Dec 18, 2023
dd30b9e
SUMA Alpha: Fixed bug where sun-T colors were not always changing whe…
OtagoHarbour Dec 18, 2023
121d78b
SUMA Alpha: Added code to prevent crash in applyColorMapToOverlay fun…
OtagoHarbour Dec 18, 2023
4828d46
SUMA Alpha: Removed debugging output from code associated with crash …
OtagoHarbour Dec 20, 2023
0180a7d
SUMA Alpha: Made current color map name dynamically allocated
OtagoHarbour Dec 20, 2023
9f321cf
SUMA Alpha: Fixed bug where using the period key to change viewing st…
OtagoHarbour Dec 20, 2023
4fb67d3
SUMA Alpha: Added code that appears to prevent the colors becoming in…
OtagoHarbour Dec 22, 2023
26532df
SUMA Alpha: Tidied up code s.t. code requiring active overlay all in …
OtagoHarbour Dec 22, 2023
b2a7eb0
SUMA Alpha: Made quick fix for erroneous colors when DSET changed. S…
OtagoHarbour Jan 3, 2024
84825f2
SUMA Alpha: Fixed so it seems to work OK except that suprathreshold p…
OtagoHarbour Jan 5, 2024
72b3a66
SUMA Alpha: Needed to make a change to get it to work properly when D…
OtagoHarbour Jan 9, 2024
4940e85
SUMA Alpha: Fixed bugs that were causing the base overlay to initiall…
OtagoHarbour Jan 9, 2024
17771d8
SUMA Alpha: More fixes to deal with DSET change
OtagoHarbour Jan 10, 2024
b86c72e
SUMA Alpha: Appear to have fixed color problem
OtagoHarbour Jan 16, 2024
a8528b2
SUMA Alpha: Added code to set threshold sliding bar (to zero) when DS…
OtagoHarbour Jan 16, 2024
b03d767
SUMA Alpha: Added code to fix crashes with toy examples.
OtagoHarbour Jan 16, 2024
56ae508
SUMA Alpha: Fixed crashing of toy examples and removed no longer used…
OtagoHarbour Jan 19, 2024
483f588
SUMA Alpha: Enabled alpha to work when background colors turn off wi…
OtagoHarbour Jan 19, 2024
774bfe6
SUMA Alpha: Fixed setting threshold (sliding bar and edit box) back t…
OtagoHarbour Feb 2, 2024
98dbba1
SUMA Alpha: Tidied up code and added comments to parts that had been …
OtagoHarbour Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1,268 changes: 929 additions & 339 deletions src/SUMA/SUMA_Color.c

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions src/SUMA/SUMA_Color.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#define PSV_NOTHING 0
#define PSV_BIND_VOL 1

enum OpacityModel {LINEAR, QUADRATIC, FRACTIONAL};

byte SUMA_Val_Meets_Thresh(float val, double *ThreshRange,
SUMA_THRESH_MODE ThrMode);
int SUMA_a_good_col(char *name, int i, float *acol);
Expand Down Expand Up @@ -232,5 +234,7 @@ SUMA_Boolean SUMA_CreateCmapHash(SUMA_COLOR_MAP *CM);
NI_group *SUMA_CmapToNICmap(SUMA_COLOR_MAP *CM);
SUMA_COLOR_MAP *SUMA_NICmapToCmap(NI_group *ngr);
char *SUMA_RGB_to_hex(float *fv, char *here);
int *boxThresholdOutline(SUMA_SurfaceObject *SO, int *numThresholdNodes);
float *alphaOpacitiesForOverlay(SUMA_OVERLAYS *overlay);

#endif
18 changes: 16 additions & 2 deletions src/SUMA/SUMA_CreateDO.c
Original file line number Diff line number Diff line change
Expand Up @@ -6382,6 +6382,7 @@ SUMA_Boolean SUMA_DrawTractDO_basic (SUMA_TractDO *TDO, SUMA_SurfaceViewer *sv)
}
Sover = SUMA_ADO_CurColPlane(ado);
#if 1
// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, ADO_ID((SUMA_ALL_DO *)TDO));
if (Sover) TDO->colv = SUMA_GetColorList(sv, ADO_ID((SUMA_ALL_DO *)TDO));
if (!TDO->colv) {
SUMA_S_Warn("Colv not found for %s\n", ADO_LABEL((SUMA_ALL_DO *)TDO));
Expand Down Expand Up @@ -6790,6 +6791,7 @@ SUMA_Boolean SUMA_DrawTractDO (SUMA_TractDO *TDO, SUMA_SurfaceViewer *sv)
ans = NOPE; goto GETOUT;
}
#if 1
// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, ADO_ID((SUMA_ALL_DO *)TDO));
if (Sover) TDO->colv = SUMA_GetColorList(sv, ADO_ID((SUMA_ALL_DO *)TDO));
if (!TDO->colv) {
SUMA_S_Warn("Colv not found for %s\n", ADO_LABEL((SUMA_ALL_DO *)TDO));
Expand Down Expand Up @@ -9033,6 +9035,7 @@ SUMA_Boolean SUMA_DrawGraphDO_G3D (SUMA_GraphLinkDO *gldo,
#endif
}
/* Colors? */
// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, SDSET_ID(dset));
GSaux->SDO->colv = SUMA_GetColorList(sv, SDSET_ID(dset));
/* thickness? */
GSaux->SDO->thickv = NULL;
Expand Down Expand Up @@ -9066,6 +9069,7 @@ SUMA_Boolean SUMA_DrawGraphDO_G3D (SUMA_GraphLinkDO *gldo,
It would be best to create a new class of segment DOs that
are just for graph links and never store colv inside SDO.
See SUMA_free_SegmentDO for special treatment of colv */
// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, SDSET_ID(dset));
GSaux->SDO->colv = SUMA_GetColorList(sv, SDSET_ID(dset));
SUMA_LH("Colv for %s is %p", ADO_LABEL(ado), GSaux->SDO->colv);
/* and draw the GSaux */
Expand Down Expand Up @@ -16983,6 +16987,7 @@ SUMA_Boolean SUMA_ApplyDataToNodeObjects(

SUMA_ENTRY;

// fprintf(stderr, "%s: 1: DO_idstr = %s\n", FuncName, SurfObj->idcode_str);
if (!(colp = SUMA_GetColorList (sv, SurfObj->idcode_str))) SUMA_RETURN(NOPE);

if (! (SurfObj->NodeObjects &&
Expand Down Expand Up @@ -17758,6 +17763,7 @@ void SUMA_DrawMesh_mask(SUMA_SurfaceObject *SurfObj, SUMA_SurfaceViewer *sv)
glEnableClientState (GL_COLOR_ARRAY);
glEnableClientState (GL_VERTEX_ARRAY);
glEnableClientState (GL_NORMAL_ARRAY);
// fprintf(stderr, "%s: 2: DO_idstr = %s\n", FuncName, SurfObj->idcode_str);
colp = SUMA_GetColorList (sv, SurfObj->idcode_str);
if (!colp) { /* no color list, try PermCol */
if (SurfObj->PermCol) {
Expand Down Expand Up @@ -17975,13 +17981,13 @@ void SUMA_DrawMesh(SUMA_SurfaceObject *SurfObj, SUMA_SurfaceViewer *sv)
SUMA_ENTRY;

SUMA_LH("Entered DrawMesh");

if (LocalHead) {
SUMA_EnablingRecord SER;
SUMA_RecordEnablingState(&SER, SurfObj->Label);
SUMA_DiffEnablingState(&SER, NULL, NULL, NULL);
}

if ( SurfObj->PolyMode == SRM_Hide ||
sv->PolyMode == SRM_Hide ||
SurfObj->TransMode == STM_16 ||
Expand Down Expand Up @@ -18158,6 +18164,7 @@ void SUMA_DrawMesh(SUMA_SurfaceObject *SurfObj, SUMA_SurfaceViewer *sv)
glEnableClientState (GL_COLOR_ARRAY);
glEnableClientState (GL_VERTEX_ARRAY);
glEnableClientState (GL_NORMAL_ARRAY);
// fprintf(stderr, "%s: 3: DO_idstr = %s\n", FuncName, SurfObj->idcode_str);
colp = SUMA_GetColorList (sv, SurfObj->idcode_str);
if (!colp) { /* no color list, try PermCol */
if (SurfObj->PermCol) {
Expand All @@ -18176,10 +18183,17 @@ void SUMA_DrawMesh(SUMA_SurfaceObject *SurfObj, SUMA_SurfaceViewer *sv)
if (LocalHead)
fprintf(stdout, "Ready to draw Elements %d from %s\n",
N_glar_FaceSet, SurfObj->Label);

switch (RENDER_METHOD) {
case TRIANGLES:
SUMA_LH("Tri %d %p",NP, SurfObj->glar_FaceSetList);
if (NP==3) {
for (int i=0; i<(GLsizei)N_glar_FaceSet; ++i){
int i3 = 3*i;
fprintf("SurfObj->glar_FaceSetList[%d] = (%d, %d, %d)\n", i,
SurfObj->glar_FaceSetList[i3], SurfObj->glar_FaceSetList[13+1], SurfObj->glar_FaceSetList[i3+2]);
}
// TOY_CRASH: WHERE CRASH OCCURS WITH TOY EXAMPLES.
glDrawElements ( GL_TRIANGLES, (GLsizei)N_glar_FaceSet*3,
GL_UNSIGNED_INT, SurfObj->glar_FaceSetList);
} else if (NP==4) {
Expand Down
2 changes: 0 additions & 2 deletions src/SUMA/SUMA_DOmanip.c
Original file line number Diff line number Diff line change
Expand Up @@ -2892,9 +2892,7 @@ SUMA_SurfaceObject *SUMA_Contralateral_SO(SUMA_SurfaceObject *SO,
if (SO->Side == SUMA_LEFT) findside = SUMA_RIGHT;
else findside = SUMA_LEFT;

fprintf(stderr, "SUMA_Contralateral_SO: N_dov=%d\n", N_dov);
for (i=0; i<N_dov; ++i) {
fprintf(stderr, "SUMA_Contralateral_SO: (i,SO->Group) =(%d, %s)\n", i, SO->Group);
if (SUMA_isSO_G(dov[i], SO->Group)) {
SOC = (SUMA_SurfaceObject *)dov[i].OP;
if (SOC->Side == findside && !strcmp(SOC->State, SO->State) ) break;
Expand Down
2 changes: 2 additions & 0 deletions src/SUMA/SUMA_Engine.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ SUMA_Boolean SUMA_Engine (DList **listp)

SUMA_ENTRY;


if (NI_TALK_MODE < 0) {
if (AFNI_yesenv("SUMA_NI_TEXT_TALK_MODE")) {
SUMA_S_Note("Talking in text mode");
Expand Down Expand Up @@ -3615,6 +3616,7 @@ SUMA_Boolean SUMA_Engine (DList **listp)

if ((SO = SUMA_SV_Focus_SO(sv))) {
GLfloat *glar_ColorList;
// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, SO->idcode_str);
glar_ColorList = SUMA_GetColorList(sv, SO->idcode_str);
if (!glar_ColorList) {
SUMA_S_Err("NULL color list array. Trouble.");
Expand Down
2 changes: 2 additions & 0 deletions src/SUMA/SUMA_SVmanip.c
Original file line number Diff line number Diff line change
Expand Up @@ -1784,6 +1784,8 @@ GLfloat * SUMA_GetColorList (SUMA_SurfaceViewer *sv, char *DO_idstr)
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY_LH;

// fprintf(stderr, "%s: DO_idstr = %s\n", FuncName, DO_idstr);

if (!DO_idstr) {
SUMA_S_Err("DO_idstr is NULL, this should not be.");
Expand Down
13 changes: 12 additions & 1 deletion src/SUMA/SUMA_define.h
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,9 @@ typedef struct {
DList *ClustList; /*!< The list of clusters */
byte *ClustOfNode; /*!< Tells which cluster a node belongs to, Should have
SO->N_Node values in it*/
float AlphaThresh;
int AlphaThresh; // "A" button checked. Opacity of overlay falls off away
// from threshold
int BoxOutline; // "B" button checked. Threshold outlined with black pixels.
} SUMA_OVERLAYS;


Expand Down Expand Up @@ -1741,6 +1743,8 @@ typedef struct {
controlling the coord bias widgets */
SUMA_MENU_WIDGET *LinkModeMenu; /*[SW_N_LinkMode] vector of widgets
controlling the linking of I, T widgets */
// SUMA_MENU_WIDGET *AlphaMode_Menu; /*Alpha vector of widgets
// controlling alpha threshold and boxing */
SUMA_MENU_WIDGET *CmapModeMenu; /* [SW_N_CmapMode] */
Widget opts_rc; /*!< rowcolumn for color map, color bar and switch buttons */
Widget opts_form; /*!< rowcolumn containing all options for colormapping */
Expand All @@ -1765,6 +1769,10 @@ typedef struct {
int DeleteMask_row;
float tract_length_mask[2];
int UseMaskLen;
Widget AlphaThresh_tb; /*!< alpha threshold */
Widget BoxOutlineThresh_tb; /*!< box outline threshold */
int AlphaThresh;
int BoxOutlineThresh;
}SUMA_X_SurfCont;

typedef struct {
Expand Down Expand Up @@ -3244,6 +3252,9 @@ typedef struct {

SUMA_DRAW_MASKS *DW; /*!< A structure containing node masking information
for on the fly masking */
int AlphaThresh; // "A" button checked. Opacity of overlay falls off away
// from threshold
int BoxOutline; // "B" button checked. Threshold outlined with black pixels.
} SUMA_SurfaceObject; /*!< \sa Alloc_SurfObject_Struct in SUMA_DOmanip.c
\sa SUMA_Free_Surface_Object in SUMA_Load_Surface_Object.c
\sa SUMA_Print_Surface_Object in SUMA_Load_Surface_Object.c
Expand Down
36 changes: 9 additions & 27 deletions src/SUMA/SUMA_display.c
Original file line number Diff line number Diff line change
Expand Up @@ -1541,7 +1541,6 @@ int SUMA_ApplyVisualState(NI_element *nel, SUMA_SurfaceViewer *csv)
}
} else ContY[0] = -1.0;

fprintf(stderr, "%s\n", FuncName);
if (ContX[0] >= 0 && ContY[0] >= 0 &&
(SurfCont = SUMA_ADO_Cont(ado))&&
SUMA_viewSurfaceCont(NULL, ado, csv)) {
Expand Down Expand Up @@ -2492,6 +2491,7 @@ void SUMA_display_one(SUMA_SurfaceViewer *csv, SUMA_DO *dov)
env above for example */
SUMA_DrawMesh_mask(SO, csv); /* create the surface */
} else {
// fprintf(stderr, "%s: 1: DO_idstr = %s\n", FuncName, SO->idcode_str);
SUMA_DrawMesh(SO, csv); /* create the surface */
}
}
Expand Down Expand Up @@ -6609,7 +6609,6 @@ int SUMA_OpenSurfCont_if_other(Widget w,
SUMA_LHv("Window map_state: %d\n", winattr.map_state);
}

fprintf(stderr, "%s\n", FuncName);
if (!SUMA_viewSurfaceCont(w, ado, sv)) {
SUMA_S_Err("Failed to view surface cont");
SUMA_RETURN(0);
Expand All @@ -6636,7 +6635,6 @@ int SUMA_OpenCloseSurfaceCont(Widget w,

if (w) {
SUMA_LH("nism");
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont( w, (XtPointer)ado, NULL);
} else {
if (!sv) {
Expand All @@ -6648,10 +6646,8 @@ int SUMA_OpenCloseSurfaceCont(Widget w,
}
if (!SUMA_isADO_Cont_Created(ado)) {
SUMA_LH("Creationism");
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont( sv->X->TOPLEVEL, (XtPointer)ado, NULL);
} else {
fprintf(stderr, "%s\n", FuncName);
/* must have been closed, open it */
if (!SUMA_viewSurfaceCont( sv->X->TOPLEVEL, ado, sv)) {
SUMA_S_Err("Failed to open surf cont anew");
Expand Down Expand Up @@ -6913,7 +6909,6 @@ int SUMA_viewSurfaceCont(Widget w, SUMA_ALL_DO *ado,

if (LocalHead)
SUMA_LH("Calling SUMA_cb_createSurfaceCont.");
fprintf(stderr, "%s\n", FuncName);
if (w) SUMA_cb_createSurfaceCont( w, (XtPointer)ado, NULL);
else SUMA_cb_createSurfaceCont( sv->X->TOPLEVEL, (XtPointer)ado, NULL);
} else {
Expand Down Expand Up @@ -7037,14 +7032,11 @@ void SUMA_cb_viewSurfaceCont(Widget w, XtPointer data, XtPointer callData)
SUMA_RETURNe;
}
}
fprintf(stderr, "Surface = %s\n",
((SUMA_SurfaceObject *)(ado))->Label);
}else {
fprintf (SUMA_STDERR,"%s: No displayable objects in focus.\n", FuncName);
SUMA_RETURNe;
}

fprintf(stderr, "%s\n", FuncName);
if (!SUMA_viewSurfaceCont(w, ado, sv)) {
SUMA_S_Err("Failed in SUMA_viewSurfaceCont ADO %s", ADO_LABEL(ado));
SUMA_RETURNe;
Expand Down Expand Up @@ -7686,7 +7678,6 @@ void SUMA_cb_createSurfaceCont(Widget w, XtPointer data, XtPointer callData)
SUMA_LH("Creating controller for %s", ADO_LABEL(ado));
switch (ado->do_type) {
case SO_type:
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont_SO(w, data, callData);
break;
case CDOM_type:
Expand All @@ -7702,19 +7693,15 @@ void SUMA_cb_createSurfaceCont(Widget w, XtPointer data, XtPointer callData)
break;
case GRAPH_LINK_type: {
SUMA_GraphLinkDO *gldo=(SUMA_GraphLinkDO *)ado;
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont_GLDO(w, (XtPointer)ado, callData);
break; }
case TRACT_type: {
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont_TDO(w, (XtPointer)ado, callData);
break; }
case MASK_type: {
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont_MDO(w, (XtPointer)ado, callData);
break; }
case VO_type: {
fprintf(stderr, "%s\n", FuncName);
SUMA_cb_createSurfaceCont_VO(w, (XtPointer)ado, callData);
break; }
default:
Expand Down Expand Up @@ -7914,7 +7901,6 @@ void SUMA_cb_createSurfaceCont_SO(Widget w, XtPointer data, XtPointer callData)
sss = "font8";
}

// fprintf(stderr, "slabel = %s\n", slabel);
SUMA_LH("Creating dialog shell.");
if (!SUMAg_CF->X->UseSameSurfCont ||
!SUMAg_CF->X->CommonSurfContTLW) { /* need a new one */
Expand Down Expand Up @@ -7955,7 +7941,6 @@ void SUMA_cb_createSurfaceCont_SO(Widget w, XtPointer data, XtPointer callData)
if (SUMAg_CF->X->UseSameSurfCont) {
Widget scroller;
SUMAg_CF->X->CommonSurfContTLW = tls;
fprintf(stderr, "%s\n", FuncName);
SUMAg_CF->X->SC_Notebook =
XtVaCreateWidget("ControllerBook", xmNotebookWidgetClass,
SUMAg_CF->X->CommonSurfContTLW,
Expand Down Expand Up @@ -8818,7 +8803,6 @@ void SUMA_cb_createSurfaceCont_GLDO(Widget w, XtPointer data,
if (SUMAg_CF->X->UseSameSurfCont) {
Widget scroller;
SUMAg_CF->X->CommonSurfContTLW = tls;
fprintf(stderr, "%s\n", FuncName);
SUMAg_CF->X->SC_Notebook =
XtVaCreateWidget("ControllerBook", xmNotebookWidgetClass,
SUMAg_CF->X->CommonSurfContTLW,
Expand Down Expand Up @@ -9768,7 +9752,6 @@ void SUMA_cb_createSurfaceCont_TDO(Widget w, XtPointer data,
if (SUMAg_CF->X->UseSameSurfCont) {
Widget scroller;
SUMAg_CF->X->CommonSurfContTLW = tls;
fprintf(stderr, "%s\n", FuncName);
SUMAg_CF->X->SC_Notebook =
XtVaCreateWidget("ControllerBook", xmNotebookWidgetClass,
SUMAg_CF->X->CommonSurfContTLW,
Expand Down Expand Up @@ -10601,7 +10584,6 @@ void SUMA_cb_createSurfaceCont_VO(Widget w, XtPointer data, XtPointer callData)
if (SUMAg_CF->X->UseSameSurfCont) {
Widget scroller;
SUMAg_CF->X->CommonSurfContTLW = tls;
fprintf(stderr, "%s\n", FuncName);
SUMAg_CF->X->SC_Notebook =
XtVaCreateWidget("ControllerBook", xmNotebookWidgetClass,
SUMAg_CF->X->CommonSurfContTLW,
Expand Down Expand Up @@ -14541,7 +14523,7 @@ int SUMA_ColPlane_NewOrder(SUMA_ALL_DO *ado, SUMA_OVERLAYS *colp,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

if (!ado || !(SurfCont = SUMA_ADO_Cont(ado))) SUMA_RETURN(0);
curColPlane = SUMA_ADO_CurColPlane(ado);
if (!colp) colp = curColPlane;
Expand Down Expand Up @@ -14845,7 +14827,7 @@ int SUMA_ColPlane_NewOpacity (SUMA_ALL_DO *ado, SUMA_OVERLAYS *colp,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

SUMA_LH("Called");

if (!ado || !(SurfCont = SUMA_ADO_Cont(ado))) SUMA_RETURN(0);
Expand Down Expand Up @@ -15031,7 +15013,7 @@ int SUMA_ColPlane_NewDimFact (SUMA_ALL_DO *ado, SUMA_OVERLAYS *colp,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

SUMA_LH("Called");

if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURN(0);
Expand Down Expand Up @@ -15168,7 +15150,7 @@ int SUMA_ColPlane_NewAlphaThresh (SUMA_ALL_DO *ado, SUMA_OVERLAYS *colp,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

SUMA_LH("Called");

if (!ado || !(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURN(0);
Expand Down Expand Up @@ -15495,7 +15477,7 @@ SUMA_Boolean SUMA_Remixedisplay (SUMA_ALL_DO *ADO)
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

SUMA_LHv("Called with ado=%p, ado->do_type=%d, ado->idcode_str=%s\n",
ADO, ADO?ADO->do_type:-1, SUMA_CHECK_NULL_STR(SUMA_ADO_idcode(ADO)));

Expand Down Expand Up @@ -15529,6 +15511,7 @@ SUMA_Boolean SUMA_Remixedisplay (SUMA_ALL_DO *ADO)
if (!list) list = SUMA_CreateList ();
SUMA_REGISTER_TAIL_COMMAND_NO_DATA( list, SE_RedisplayNow_AllVisible,
SES_Suma, NULL);

if (!SUMA_Engine(&list)) {
SUMA_SLP_Err("Failed to redisplay.");
SUMA_RETURN(NOPE);
Expand Down Expand Up @@ -15650,7 +15633,7 @@ int SUMA_ColPlaneShowOneFore_Set ( SUMA_ALL_DO *ado,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

if (!(SurfCont=SUMA_ADO_Cont(ado))) SUMA_RETURN(0);
if (!SUMA_isADO_Cont_Realized(ado)) SUMA_RETURN(0);

Expand Down Expand Up @@ -16278,7 +16261,7 @@ int SUMA_SelectSwitchColPlane(SUMA_ALL_DO *ado,
SUMA_Boolean LocalHead = NOPE;

SUMA_ENTRY;

if (!ado || !LW) SUMA_RETURN(0);

if (!SUMA_SelectSwitchColPlane_one(ado, LW, ichoice, CloseShop, setmen)) {
Expand Down Expand Up @@ -21439,7 +21422,6 @@ void SUMA_PromptApply_cb (Widget w, XtPointer data, XtPointer calldata)
SUMA_LH("Read %s\n", prmpt->selection);

/* verify the input */
// fprintf(stderr, "prmpt->selection = %s\n", prmpt->selection);
if (prmpt->VerifyFunction) {
if (!prmpt->VerifyFunction(prmpt->selection, prmpt->VerifyData)) {
SUMA_SLP_Err("Gibberish! try again.\n"
Expand Down