Hi afni team,
Is there a way to use label (instead of index) for SET_SUBBRICKS command in plugout?
singularity run \
-B ${root_dir}:${root_dir} \
${tool_dir}/afni_withr_24.0.08.sif \
plugout_drive \
-npb 12 \
-com "SET_FUNCTION $(basename ${dset_stats\})" \
-com "SET_SUBBRICKS -1 'cue' 'cue'" \ # this doesn't work
-com "SET_FUNC_RANGE ${frange}" \
-com "SET_THRESHNEW 0.005 p" \
-quit
I notice @chauffeur_afni does support both index and label.
Thank you.
best,
mengxing
Ah yes, @chauffeur_afni uses a 3dinfo
command to lookup the subbrik.
3dinfo -label2index <label> <dataset>
.
So a working example would be: 3dinfo -label2index cue DataSet+orig
.
So you could do that separately and then input the index integer via your plugout_drive
command.
Fantastic. This would do the work. Thanks!
Hi, Mengxing-
Just to add to @pmolfese 's answer:
Are you aiming to make a script to save an image of a brain? If you are wanting to do that specifically, then using @chauffeur_afni will likely be the easiest way to go. It basically wraps around as much of the AFNI GUI button-clicking, driving and environment variable functionality as I've been able to put in so far (and probably more will be added over time). You can select subbricks for underlay, overlay and threshold there with either the integer indices or their string label names.
- Here is a webpage of
@chauffeur_afni
examples.
- Several of the Code Example (Codex) repositories with these projects will also have command examples.
- All the volumetric brain images in afni_proc.py's APQC HTML come from
@chauffeur_afni
or other wrappers around it (like for making edge-y images), so these might provide some inspiration:
You can even add an option -cmd2script ..
to dump out a driver script made by @chauffeur_afni
, with all its utilized variables populated.
So, anyways, that might be something worth checking out.
--pt
1 Like
Ah Iām actually trying to control both AFNI and SUMA to visualize volume data in surface, and save surface images.
Thanks for your tips! -cmd2script might be helpful.