Print

Print


Thanks !
just one more question,
In need to save it as a binary, grayscale image. like this:
[image: Inline image 2]
Using
slicer img.nii -l  -z -${L3} test.png
I get the image I wanted, but with the addition of gray margin that
shouldn't be there
[image: Inline image 3]

Is there any way to get the same image only without margin?


On Sat, Jan 30, 2016 at 10:31 AM, Mark Jenkinson <
[log in to unmask]> wrote:

> 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 image
> This 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 test
> fslview 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 thanks
> Moran
>
>
>
>
>