!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
! @ p_resample.greg
! J.Pety 2003
!
! Resample 3rd axis (in general velocity) on a reference image.
! Should verify cube dimension.
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
begin data gag_scratch:resample.init
  !
  ! Parameter file for map_inter
  !
  task\character "Input File "            INPUT_MAP$ 'name'"."'type'
  task\character "Output File "          OUTPUT_MAP$ 'name'"-resampled."'type'
  task\integer "Number of output channels "      NX$ 'aaares%dim[3]'
  task\real "New reference channel "      REFERENCE$ 'aaares%convert[1,3]'
  task\real "New value at reference channel " VALUE$ 'aaares%convert[2,3]'
  task\real "New increment per channel "  INCREMENT$ 'aaares%convert[3,3]'
  task\go
  !
end data gag_scratch:resample.init
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!
define character fullname*256
let fullname 'refname'"."'reftype'
if file(fullname) then
   if exist(aaares) then
      delete /var aaares
   endif
   define image aaares 'fullname' read /global
   vector\run map_inter gag_scratch:resample.init /nowin
   let name 'name'"-resampled"
   say "Name set to "'name'
else
   message e resample ""'fullname'" does not exist"
endif
!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
