AFNI Message Board

Dear AFNI users-

We are very pleased to announce that the new AFNI Message Board framework is up! Please join us at:

https://discuss.afni.nimh.nih.gov

Existing user accounts have been migrated, so returning users can login by requesting a password reset. New users can create accounts, as well, through a standard account creation process. Please note that these setup emails might initially go to spam folders (esp. for NIH users!), so please check those locations in the beginning.

The current Message Board discussion threads have been migrated to the new framework. The current Message Board will remain visible, but read-only, for a little while.

Sincerely, AFNI HQ

History of AFNI updates  

|
January 10, 2019 05:49PM
Here is an example of how to do this using that cartesian coordinate equation juggled around and then modifying the example for a sphere in 3dcalc's help.

c = z-radius of the spindle-shaped ellipsoid/symmetrical egg
a = xy-radius of the egg
let a=10, c=20
a^2=100, c^2=400, a^2c^2=40000

# make prolate spheroid with 3dcalc
set dset = MP3d_anat+orig
# note xyz defined by RAI coordinates
# xy radius
set a = 10
# z radius
set c = 20
# set the center
set xc = 10
set yc = 20
set zc = -30

# these lines make it a bit easier to read below and faster
# if you have to do lots of these
set a2 = `ccalc -expr "$a^2"`
set c2 = `ccalc -expr "$c^2"`
set a2c2 = `ccalc -expr "$a2*$c2"`

# generate 3D volume
3dcalc -a $dset -RAI -expr "step($a2c2-$c2*((x-$xc)^2+(y-$yc)^2)-$a2*(z-$zc)^2)" -prefix prolate1 -overwrite


Then you can render this
suma -vol prolate1+orig.



Edited 1 time(s). Last edit at 01/10/2019 08:33PM by Daniel Glen.
Attachments:
open | download - prolate_spheroid.png (31.2 KB)
Subject Author Posted

prolate spheroid?

storrisi January 10, 2019 04:54PM

Re: prolate spheroid? Attachments

Daniel Glen January 10, 2019 05:49PM

Re: prolate spheroid?

storrisi January 11, 2019 01:04PM

Re: prolate spheroid?

Daniel Glen January 11, 2019 02:01PM

Re: prolate spheroid?

storrisi January 11, 2019 02:03PM