#!/bin/bash

. `dirname $0`/env.sh 


PATIENTID=$1

$WEBDAV/set_project.sh $DSPECTPROJECT
OUTDIR=$DSPECTTMP/$PATIENTID;

if [ ! -d $OUTDIR ] ; then
	mkdir $OUTDIR;
fi;


for ((i=0;i<20;i++)) ; do
	F=${PATIENTID}Volume$i.nrrd;
	$WEBDAV/getFile.sh $PATIENTID/$F $OUTDIR/$F;
done;

F=${PATIENTID}_Ventricle.mcsv;
$WEBDAV/getFile.sh $PATIENTID/$F $OUTDIR/$F;

F=${PATIENTID}_Dummy.mcsv;
$WEBDAV/getFile.sh $PATIENTID/$F $OUTDIR/$F;

FILES="k1.nrrd vbf.nrrd";
for f in $FILES ; 
do
	F=${PATIENTID}_$f;
	$WEBDAV/getFile.sh $PATIENTID/$F $OUTDIR/$F;
done;




