In this PR, the FSL function description file has been completed. All 38 function names are present. Most of them have been described from the FSL documentation. However, for some of them, it's more difficult like fslmaths (see issue).
For the slicer function the description file had to be adapted. Indeed, this function looks like this according to the FSL documentation:
Usage: slicer <input> [input2] [main options] [output options - any number of these]
Main options: [-L] [-l <lut>] [-s <scale>] [-i <intensitymin> <intensitymax>] [-e <thr>] [-t] [-n] [-u]
These must be before output options.
-L : Label slices with slice number.
-l <lut> : use a different colour map from that specified in the header.
-i <min> <max> : specify intensity min and max for display range.
-e <thr> : use the specified threshold for edges (if >0 use this proportion of max-min, if <0, use the absolute value)
-t : produce semi-transparent (dithered) edges.
-n : use nearest-neighbour interpolation for output.
-u : do not put left-right labels in output.
-c : add a red dot marker to top right of imageOutput options:
[-x/y/z <slice> <filename>] : output sagittal, coronal or axial slice
(if <slice> >0 it is a fraction of image dimension, if <0, it is an absolute slice number)
[-a <filename>] : output mid-sagittal, -coronal and -axial slices into one image
[-A <width> <filename>] : output _all_ axial slices into one image of _max_ width <width>
[-S <sample> <width> <filename>] : as -A but only include every <sample>'th slice
An input is always present, sometimes a second one. To adapt, the script looks at what is at the position of the second input. If it starts with a - then it is not an entity.
The parameters -x, -y, -z, -A and -S also required adaptations as for these parameters the entity does not follow directly. There is a gap.
So the file has been improved and looks like this for this function:
This is an addition. Everything that worked in the JSON description, still works.
Furthermore, in some slicer commands some parameters are repeated:
/slicer example_func2highres highres -s 2 -x 0.35 sla.png -x 0.45 slb.png -x 0.55 slc.png
The script has been adapted to this case for functions described with dict like {"name":"-A", "index": 2}. If necessary, it may be generalised to other cases.
In this PR, the FSL function description file has been completed. All 38 function names are present. Most of them have been described from the FSL documentation. However, for some of them, it's more difficult like
fslmaths
(see issue).For the
slicer
function the description file had to be adapted. Indeed, this function looks like this according to the FSL documentation:An input is always present, sometimes a second one. To adapt, the script looks at what is at the position of the second input. If it starts with a
-
then it is not an entity.The parameters
-x
,-y
,-z
,-A
and-S
also required adaptations as for these parameters the entity does not follow directly. There is a gap.So the file has been improved and looks like this for this function:
This is an addition. Everything that worked in the JSON description, still works.
Furthermore, in some slicer commands some parameters are repeated:
/slicer example_func2highres highres -s 2 -x 0.35 sla.png -x 0.45 slb.png -x 0.55 slc.png
The script has been adapted to this case for functions described with dict like{"name":"-A", "index": 2}
. If necessary, it may be generalised to other cases.