| imsort | ctio | imsort |
imsort -- Sort images by header parameter values
imsort images parameter
The task will read the value for the specified header parameter for all
the images specified, and then sort the image names based on these values.
Images without the specified parameter in their headers are skipped with
a warning message.
It it possible to sort either numerically or alphabetically. If numeric
sorting is specified, then string valued header parameters are associated
with an INDEF value. This guarantess that it will be possible to perform
the sort, since INDEF is a numeric value (actually a big value).
It is also possible to reverse the sense of the sort.
The output of the task is printed to the standard output. It consists
of the list of all the sorted image names.
If verbose output is selected, the header parameter values are printed
along with the image names.
Take the following example with four images:
lo> hselect images* $I,otime yes image1.imh 1000 image2.imh 40 image3.imh 2 image4.imh 125Now perform several different sorts. Remember that the default is to sort numerically, not to invert the sort, and non-verbose output:
lo> unlearn imsort <-- to get defaults lo> imsort images* otime image3.imh image2.imh image4.imh image1.imh lo> imsort images* otime verbose+ image3.imh 2 image2.imh 40 image4.imh 125 image1.imh 1000 lo> imsort images* otime invert+ verbose+ image1.imh 1000 image4.imh 125 image2.imh 40 image3.imh 2 lo> imsort images* otime numeric- verbose+ image1.imh 1000 image4.imh 125 image3.imh 2 image2.imh 40 lo> imsort images* otime numeric- invert+ verbose+ image2.imh 40 image3.imh 2 image4.imh 125 image1.imh 1000
files, sort, hselect