Hi,
You can replace the last two lines with:
slicer img.nii -l $FSLDIR/etc/luts/renderhot.lut -z -${L3} test.png
Note that there isn't a lut (lookup table) that is exactly the same as the Red in FSLView, but you can quite easily make one from $FSLDIR/etc/luts/renderhot.lut yourself (it is just a simple text file defining RGB colours) if you want to.
All the best,Mark
From: FSL - FMRIB's Software Library <[log in to unmask]> on behalf of Moran Artzi <[log in to unmask]>
Reply-To: FSL - FMRIB's Software Library <[log in to unmask]>
Date: Saturday, 30 January 2016 07:04
To: "[log in to unmask]" <[log in to unmask]>
Subject: [FSL] Auto save .png image
Dear all,I want to save image of the middle slice (on z axis) of binary imageThis slice can be detect using
L1=`fslstats img.nii-w | cut -d' ' -f5`L2=`fslstats img.nii -w | cut -d' ' -f6`L3=`echo "$L1 +($L2 / 2)" | bc -l`fslmaths img.nii -roi 0 600 0 600 $L3 1 0 1 testfslview img.nii test -l Red
Is it possible to automatically save from the from the command line image in .png format of the axial orientation of this image (as appears in the viewer)
Many thanksMoran