#!/bin/sh -e

## We will work in the tmp directory :
cd $AUTOPKGTEST_TMP

## Getting data by cloning git :
git clone https://plmlab.math.cnrs.fr/tomogroup/ufo-testing.git

export UFO_DEVICE_TYPE="cpu,gpu"

## Data should now sits here : ufo-testing/sino-bin-810x1562-4.raw
ufo-launch read path=ufo-testing/sino-bin-810x1562-4.raw raw-width=810 raw-height=1562 raw-bitdepth=32 ! \
  destrip-faster threshold=.1 max-correction=10 strip-width=16 average-height=250 output=destriped correction-mode=additive ! \
  smooth-pad out-width=1024 in-center=405 ! \
  crop x=0 width=1024 y=200 height=1004 ! \
  fft auto-zeropadding=0 dimensions=1 ! filter filter=ramp-fromreal ! ifft ! \
  backproject angle-step=0.003127908 mode=texture roi-x=0 roi-y=0 roi-width=1024 roi-height=1024 axis-pos=512 ! \
  write filename=reco-fbp-1024x1024-4.raw bits=32
