AD - Add images

(9/02/09)

PURPOSE

Adds two or more images or volumes together. The sum is placed in an output file.

SEE ALSO

AS R [Average image/volume series, optional subset]
PA [Patch image into a larger existing image/volume]
AD S [Add Series of images]

USAGE

.OPERATION: AD

.INPUT FILE: PIC001
[Enter the name of the first file to be added. (Header positions from this file are transferred to output.)]

.NEXT INPUT FILE: PIC002
[Enter the name of the next file to be added. Can be same as first input file.]

.OUTPUT FILE: PIC999
[Enter the name of the output file. Can be same as either input file]

SPIDER continues to ask:

.NEXT INPUT FILE: PIC003
[Enter the name of the third file to be added.]

'AD' will continue in this manner until an asterisk ('*') is given as the name of the next input file.

EXAMPLE Usage

NOTES

  1. 'AD' only works for files with the same dimensions. To add files of different dimensions, use PATCH (see 'PA').

  2. For adding an entire file series, is is more practical to use operation 'AS R'. This will also produce a variance map.

  3. For use in a procedure you can use the following set of operations:
     
       BL               ; Create blank output file 
       jnk999           ; Output file name 
       64 64            ; Dimensions of output file (same as input) 
       N                ; Do not use average 
       0.0              ; Image value 
       DO  [num]=1,4 
          AD            ; Add files operation  
          jnk{***[num]} ; Input file 
          jnk999        ; Second input file  
          jnk999        ; Output file 
          *             ; Put asterick here  
       ENDDO 
    

SUBROUTINES

ADD

CALLER

UTIL2

© Copyright Notice /       Enquiries: spider@wadsworth.org