openmicroscopy/bioformats — pull request #1272 by sbesson (2014-08-15 19:53:52+00:00)
Title: bfGetReader: signature

This PR adds some breaking changes to the `bfGetReader` signature to allow the creation of uninitialized readers.

- all the previous UI dialog logic called when no/empty input is passed is removed. This ui logic still exists in the top-level `bfopen` function but `bfGetReader` should be more easily used in batch mode
- `bfGetReader()` or `bfGetReader('')` now creates and returns an unitialized `ReaderWrapper`. This change should add some flexibility to the reader construction without complicating the function logic, e.g.

```
r= bfGetReader();
r=loci.format.Memoizer(r);
r.setId(id);
```

- `bfGetReader('invalid_path`) should now throw an exception that can be handled in a `try.. catch` block
- `bfGetReader('string.fake')` and `bfGetReader('valid_path')` should still work as previously and return an initialized reader
- corresponding tests are added to `TestBfGetReader`
- the function header should be modified to account for the changes describe above

--no-rebase