I had hoped to be able to test the selected status of each image in a standalone viewer's collection of Item objects but the sample code returns zero no matter how many of the images are (or were) actually selected. The selected property always returns false.
var vwr = DOpus.viewers.lastactive;
var item_count = 0;
for (var i = 0; i < vwr.files.count; i++) item_count = item_count + vwr.files(i).selected;
Is this because the tab from which the viewer was launched may no longer be open? It would still be useful to know if only one item was originally selected.