Hi,
You can use slicer to create the individual views, save these as png or gif and then use pngappend to compose your montage at the command line
Hth
Christian
> On 9. May 2018, at 15:11, Christopher Benjamin <[log in to unmask]> wrote:
>
> Dear FSL gurus,
>
> I’m trying to create a single jpg 4*6 montage of slides from an mprage as simply as possible. I can use slicer to extract the images I want (below), but am having trouble tiling these in a single image. I know it should be very easy using slicer, but I cannot work out how to get the -S switch to work correctly, so currently have a clunky work around of passing the slices to Matlab to be tiled using a separate set of commands. Any advice much appreciated!
>
> Chris
>
>
>
>
>
> #Number of slices in image you want to display
> $n_slices=`fslhd $mprage | grep dim3 | awk 'NR==1 {print $2}'`
>
> #Increment required to get <=24 slices from this (for 6x4 jpg)
> let increment=($n_slices+24-1)/24
>
> #Set variables for slicing image
> image_to_slice=$mprage;
> slice_bottom=10;
> slice_top=$n_slices;
> slice_increment=$increment;
> number_of_slices=$n_slices;
>
> echo "Slicing $mprage..."
>
> #make directory to write the sliced images into
> mkdir $fused_maps/jpg_$var
> cd $fused_maps/jpg_$var
>
> #Loop to slice the image using the above parameters
> count=1
> for (( N = $slice_bottom; N <= $slice_top; N += $slice_increment )); do
> FRAC=$(echo "scale=2; $N / $number_of_slices" | bc -l);
> slicer "$image_to_slice" -L -y $FRAC "${image_to_slice}_$count.png";
> count=$(echo "${count}+1" | bc -l);
> done
>
> # Slices passed to MATLAB, where they're tiled into a single jpg
|