Lightbox Viewer

  1. A counting loop
    Construct a while loop that counts from 0 to a number specified as the first command line argument. Show the numbers on the screen.

  2. Generating slices
    Use the previous script to generate an individual image for each of the first N slices of the volume im3.
    Generate the images using
      slicer imagename -z -num output_num.ppm
    where num is the number of the slice (starting from 0).

  3. Viewing images
    View the images separately using display

  4. Read the number of slices
    Use fslval to automatically determine the total number of slices.

  5. Merge all images into one (Advanced)
    Use pngappend to make a single lightbox style image from all the individual slices.