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

Suma20240327 #629

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
d73dad2
SUMA: Fixed bug that was causing "zero" parts of the background withi…
OtagoHarbour Mar 27, 2024
450ae3e
SUMA: Moved fields, related to "A" or "B" buttons, out of the SUMA_OV…
OtagoHarbour Mar 29, 2024
f0abf3c
SUMA: Consolidated fields, related to "A" and "B" boxes, into the SUM…
OtagoHarbour Mar 29, 2024
c785f01
SUMA: Changed variable name for "A" check-box widget so that it is no…
OtagoHarbour Mar 29, 2024
402fb6d
SUMA:
OtagoHarbour Apr 2, 2024
485e4e4
SUMA: Made "A" button work with multiple surface input. Still has pr…
OtagoHarbour Apr 10, 2024
8a6d9ec
SUMA: Adjusted code so that the "A" checkbox reflects the actual stat…
OtagoHarbour Apr 10, 2024
b9a243b
SUMA: Modified code to prevent surface control menu from lengthening …
OtagoHarbour Apr 18, 2024
ad4fb31
SUMA: Modified code s.t. the "A" checkbox it lit up iff graduated sub…
OtagoHarbour Apr 23, 2024
a28dcfd
SUMA: Fixed bug where "A" box lighting up was out of synch with the s…
OtagoHarbour Apr 24, 2024
765b02c
SUMA: Added script, @DriveSumaExpandingBottomDemo, to test suma for s…
OtagoHarbour Apr 24, 2024
59052cd
SUMA: Added script, @sumaTestCases which has test cases for transpare…
OtagoHarbour Apr 26, 2024
7642f30
SUMA: Added test scripts"
OtagoHarbour May 6, 2024
bb7140a
SUMA_{Engine,Display}.c: get rid of commenting/space changes
mrneont May 8, 2024
e31ba2e
SUMA_Color.c: get rid of commenting/space changes
mrneont May 8, 2024
83fca26
no escaping for you, Q
afni-rickr May 15, 2024
2cf3071
to possibly be added later
afni-rickr May 15, 2024
35b368b
minor cleanup
afni-rickr May 16, 2024
b4a60eb
SUMA: Added test script for alpha
OtagoHarbour May 22, 2024
da26ce1
SUMA: Fixed problem that was preventing build with gcc14
afni-laurenpd May 22, 2024
65cc393
gcc14 changes included here (suma+others)
afni-dglen May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/3dExchange.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ int main( int argc , char * argv[] )
fac = DSET_BRICK_FACTOR(dset, i); /* get scale factor for each sub-brik*/
if(fac==0.0) fac=1.0;
nvox = data_im->nvox; /* number of voxels in the sub-brik */

outfar = outsar = outbar = mri_data_pointer(out_data_im);

outbar = (byte *) mri_data_pointer(out_data_im);
outfar = (float *) mri_data_pointer(out_data_im);
outsar = (short *) mri_data_pointer(out_data_im);
badsb_type = 0;
switch(data_im->kind){
case MRI_short:{
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile.macos_11_ARM_clang
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ XLIBS = -lXm -ljpeg -lXt

CCDEBS = -DAFNI_DEBUG -DIMSEQ_DEBUG -DDISPLAY_DEBUG -DTHD_DEBUG
CEXTRA = -m64 -Wall -Wno-deprecated-declarations -Wcomment -Wformat -DUSE_TRACING -DHAVE_XDBE \
-DDONT_USE_MCW_MALLOC $(LESSTIF_DEFS)
-Wno-implicit-int -DDONT_USE_MCW_MALLOC $(LESSTIF_DEFS)
# choose gcc version below from homebrew directory in
# either /opt/homebrew/bin
# or Apple clang from /usr/bin with
Expand Down
104 changes: 104 additions & 0 deletions src/SUMA/@DriveSumaClippingPlanes
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
#!/bin/tcsh

# [PDL: April 23, 2024] Demo for Alpha transparency
#
# Runs from ~/abin
#
# Usage: @DriveSumaClippingPlanes <Path to executable>
#
# Example: ./@DriveSumaClippingPlanes "~/afniDev/afni/build/src/SUMA"
#
# If the path to the executable is not specified, the suma, in the default
# search path, is used.

@global_parse `basename $0` "$*" ; if ($status) exit 0

#Example commands for running @DriveSuma
# No output


if ($#argv > 0) then
set path = ($1 $path)
endif


set HelpOpt = ''
echo "$1" | \grep -w -E \
'\-h_txt|\-h_spx|\-h_aspx|\-h_raw|\-help|\-h' >& /dev/null
if ($status == 0) then
set HelpOpt = "$1"
goto HELP
endif

set l = `prompt_user -pause \
'@DriveSuma \n\
#Make sure no current SUMA is running, then press OK'`
if ( $l == '0') goto STEND

# Clipping planes
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK for clipping planes'`

# set SUMA_DIR = $1
cd $HOME/AFNI_data6/FT_analysis/FT/SUMA
set NEW_PORT = `afni -available_npb_quiet`
echo $NEW_PORT
suma -spec std.60.FT_lh.spec &
# suma -spec SUMA/std.60.FT_lh.spec &

# Turn on clipping plane mode
DriveSuma -com viewer_cont -key ctrl+C

# Activate plane 4
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to acivate plane 4'`
DriveSuma -com viewer_cont -key 4

# Scroll in
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to scroll in'`
set j = 1
while ( $j <= 10 )
DriveSuma -com viewer_cont -key S
@ j++
end

# Scroll out
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to scroll out'`
set j = 1
while ( $j <= 3 )
DriveSuma -com viewer_cont -key s
@ j++
end

# Make clippnig plane invisible
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to make plane 4 active but invisible'`
DriveSuma -com viewer_cont -key C

# Scroll in
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to scroll in'`
set j = 1
while ( $j <= 3 )
DriveSuma -com viewer_cont -key S
@ j++
end

# Scroll out
set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to scroll out'`
set j = 1
while ( $j <= 3 )
DriveSuma -com viewer_cont -key s
@ j++
end

141 changes: 141 additions & 0 deletions src/SUMA/@DriveSumaExpandingBottomDemo
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/bin/tcsh

# [PDL: Fenruary 6, 2024] Demo for Alpha transparency
#
# Runs from ~/abin
#
# Usage: @DriveSumaExpandingBottomDemo <Path to executable>
#
# Example: ./@DriveSumaExpandingBottomDemo "~/afniDev/afni/build/src/SUMA"
#
# If the path to the executable is not specified, the suma, in the default
# search path, is used.

@global_parse `basename $0` "$*" ; if ($status) exit 0

#Example commands for running @DriveSuma
# No output


if ($#argv > 0) then
set path = ($1 $path)
endif


set HelpOpt = ''
echo "$1" | \grep -w -E \
'\-h_txt|\-h_spx|\-h_aspx|\-h_raw|\-help|\-h' >& /dev/null
if ($status == 0) then
set HelpOpt = "$1"
goto HELP
endif

set l = `prompt_user -pause \
'@DriveSuma \n\
#Make sure no current SUMA is running, then press OK'`
if ( $l == '0') goto STEND

#Launch suma
# set SUMA_DIR = $1
# cd $HOME/sumaTest/FT.surf.results
set NEW_PORT = `afni -available_npb_quiet`
echo $NEW_PORT
# suma -spec $HOME/AFNI_data6Old/FT_analysis/FT/SUMA/std.60.FT_both.spec &
suma -spec ../AFNI_data6Old/FT_analysis/FT/SUMA/std.60.FT_both.spec &
DriveSuma -com viewer_cont -key '.'
DriveSuma -com viewer_cont -key '.'
DriveSuma -com viewer_cont -key '.'
DriveSuma -com viewer_cont -key 'ctrl+s'
DriveSuma -com surf_cont -view_surf_cont y

DriveSuma -com surf_cont -switch_cmap ygbrp128

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to set Threshold'`

# DriveSuma -com surf_cont -load_dset stats.FT.surf.lh.niml.dset
set THR = 15
DriveSuma -com surf_cont -T_val $THR

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA yes

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to switch object up'`
echo "++++++++++++++++++++++++ Switch object up"

DriveSuma -com viewer_cont -key:v1000R j # Select node 1000
DriveSuma -com surf_cont -switch_surf rh.inflated # Switch surface

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to switch object down'`
echo "++++++++++++++++++++++++ Switch object down"

DriveSuma -com viewer_cont -key:v1000L j
DriveSuma -com surf_cont -switch_surf lh.inflated

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to switch object up'`
echo "++++++++++++++++++++++++ Switch object up"

DriveSuma -com viewer_cont -key:v1000R j # Select node 1000
DriveSuma -com surf_cont -switch_surf rh.inflated # Switch surface

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to switch object down'`
echo "++++++++++++++++++++++++ Switch object down"

DriveSuma -com viewer_cont -key:v1000L j
DriveSuma -com surf_cont -switch_surf lh.inflated


set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Linear falloff Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA Linear

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Quadratic falloff Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA Quadratic

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to tuen Alpha off'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA no

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA yes

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Linear falloff Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA Linear

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Quadratic falloff Alpha'`
DriveSuma -com surf_cont -SET_FUNC_ALPHA Quadratic

set l = `prompt_user -pause \
'@DriveSuma \n\
Press OK to see Box outline'`
DriveSuma -com surf_cont -SET_FUNC_BOXED y

set l = `prompt_user -pause \
'@DriveSuma \n\
Finished?, then press OK'`
if ( $l == '0') goto STEND


sleep 3; set l = `prompt_user -pause 'Waiting to exit'\

Loading