Skip to content

Instantly share code, notes, and snippets.

@icaoberg
Last active August 29, 2015 14:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icaoberg/bb8ea4f733e5d46952ef to your computer and use it in GitHub Desktop.
Save icaoberg/bb8ea4f733e5d46952ef to your computer and use it in GitHub Desktop.
cellorganizer-demo3D00 public CI script #ubuntu #macosx #matlab #cellorganizer
DEMO='demo3D00'
DIM='3D'
PREFIX=`pwd`/demos/"$DIM"/"$DEMO"
INPUT_DIRECTORY="$PREFIX"/synthesizedImages
if [ -d "$INPUT_DIRECTORY" ]; then
rm -rf "$INPUT_DIRECTORY"
fi
OUTPUT_DIRECTORY="$PREFIX"/projections
if [ -d "$OUTPUT_DIRECTORY" ]; then
rm -rf "$OUTPUT_DIRECTORY"
fi
PROFILE="$PREFIX"/profile.zip
if [ -f "$PROFILE" ]; then
rm -f "$PROFILE"
fi
echo "help $DEMO;
profile on
param.numberOfSynthesizedImages = 5;
$DEMO( param );
profile off
profsave( profile('info'), 'profile' );
zip( 'profile.zip', 'profile' )
rmdir( 'profile', 's' );
input_directory = [ pwd filesep 'synthesizedImages' ];
output_directory = [ pwd filesep 'projections' ];
synthesized_3Dimages_gallery_wrapper( './synthesizedImages', './projections' );
exit;" > script.m
$MATLAB -nodesktop -nosplash -r "script;"
if [ -n "$SAVED_RESULTS" ]; then
DATE=`date +%F-%H%M%S`
if [ ! -d "$SAVED_RESULTS"/"$DEMO" ]; then
echo "$SAVED_RESULTS"/"$DEMO"
mkdir "$SAVED_RESULTS"/"$DEMO"
fi
cp -r demos/"$DIM"/"$DEMO" "$SAVED_RESULTS"/"$DEMO"/"$DATE"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment