Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add notes on --downsample-type #235

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ The native libraries are not packaged with any relevant jars. See also note in
* Ubuntu 18.04+: `apt-get install libblosc1`
* conda: Installing `bioformats2raw` via conda (see below) will include `blosc` as a dependency.

If using features that rely on OpenCV (see the [Downsampling type](#downsampling-type) section below), minimum supported versions are:

* Ubuntu 18.04
* RHEL 8
* Windows 10
- expect to see warnings as described in https://github.com/opencv/opencv/issues/20113; these can be ignored
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This renders at the same level as the previous bullet point. Maybe turn into parentheses?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

19829f1 should fix the bullet points, I just missed a single space. Can put the note about warnings on the same line in parentheses if you think that's clearer though?


__NOTE:__ If you are setting `jna.library.path` via the `JAVA_OPTS` environment variable, make sure the path is to the folder __containing__ the library not path to the library itself.

Installation
Expand Down Expand Up @@ -309,6 +316,17 @@ This is particularly helpful if you do not have write permissions in the input d
As of version 0.5.0, `.*.bfmemo` files are deleted at the end of conversion by default. We do not recommend keeping these files for normal
conversions, but if they are needed for troubleshooting then the `--keep-memo-files` option can be used.

Downsampling type
=================

By default, pyramid resolutions are generated using a [very simple downsampling algorithm](https://github.com/ome/ome-common-java/blob/master/src/main/java/loci/common/image/SimpleImageScaler.java).
For some input data types, this may not be ideal. The `--downsample-type` option can be used to specify an alternative algorithm.
Supported values are `SIMPLE` (default), `GAUSSIAN`, `AREA`, `LINEAR`, `CUBIC`, and `LANCZOS`, as declared in the [Downsampling enum](https://github.com/glencoesoftware/bioformats2raw/blob/master/src/main/java/com/glencoesoftware/bioformats2raw/Downsampling.java).
No additional downsampling algorithms are directly implemented in bioformats2raw; OpenCV is used to for any value of `--downsample-type` other than the default.

If the minimum system requirements (see above) are not met, or the input data type is int8 or int32 (see https://github.com/glencoesoftware/bioformats2raw/pull/199),
then any value of `--downsample-type` other than the default is expected to throw an exception.

Additional readers
==================

Expand Down
Loading