;
;
; SOURCE: spider/docs/techs/recon/newprogs/slices.spi
;
; PURPOSE: Extract central slices from volumes.
; Used to assess the quality of the volumes.
;
; I/O PARAMETERS AND FILES ARE SET HERE:
;
; -------------------- Input files -----------------------------------
[defgrps] = 'sel_group_cclim' ; Defocus groups selection file
[vol] = 'df{***[grp]}/vol01_odd' ; Volume (one from each defocus group)
; -------------------------- Output files ---------------------------
[slice] = 'central_slices' ; Stack of central slices from volumes
; -------------- END BATCH HEADER ---------------------------------
UD NEXT [key],[grp] ; Get group from group sel. file
[defgrps] ; Group selection file (input)
IF ([key].LE.0) GOTO LB99 ; End of file (ERROR)
FI H [diam] ; Get diameter of the volume
[vol] ; First volume (input)
NSAM ; NSAM location in file header
[mid] = INT([diam]/2) + 1 ; Central slice size
[numfil] = 0
DO ; Loop over all defocus groups
PS ; Pick slice
[vol] ; Input volume (input)
[slice]@{***[grp]} ; Output slice (output)
([mid]) ; Slice number
VM
echo ' 'Stacked central slice for group: {***[grp]}
[numfil]=[numfil] + 1 ; File counter
UD NEXT [key],[grp] ; Get group from group sel. file
[defgrps] ; Group selection file (input)
IF ([key].LE.0) EXIT ; End of groups in doc file
ENDDO
UD NEXT END ; Close group sel. file
[defgrps] ; Group selection file
VM
echo ' '; echo ' 'Stacked central slices from: {***[numfil]} volumes
VM
echo ' '; echo ' 'View central slice stack: [slice].$DATEXT using Web
VM
echo ' '
LB99
EN
;