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 getter and setter for each command line option #97

Merged
merged 4 commits into from
Apr 3, 2023

Conversation

melissalinkert
Copy link
Member

Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

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

See glencoesoftware/bioformats2raw#190 (review) for a first pass on the review of this new API

@melissalinkert
Copy link
Member Author

399f418 has the input/output path changes mentioned in glencoesoftware/bioformats2raw#190, but I'm still working on a better way to set the compression type so that isn't ready for re-testing yet.

The compression type now uses the new CompressionType enum,
and compression options can be set with a CodecOptions object (that includes quality).
The command line "--quality" will be wrapped in a CodecOptions behind the scenes,
but this does not add any other command line arguments for setting compression options.
@melissalinkert
Copy link
Member Author

@sbesson: 0344585 was the last planned change I had here, so this is ready for review together with the current state of glencoesoftware/bioformats2raw#190.

@sbesson sbesson self-requested a review March 27, 2023 20:41
Copy link
Member

@sbesson sbesson left a comment

Choose a reason for hiding this comment

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

One comment about the max workers validation to match the behavior of bioformats2raw. Otherwise, tested ``--log-level, -p`, `--compression`, `--quality` `--rgb` and the behavior of the utility remains unchanged.

@Option(
names = "--max_workers",
description = "Maximum number of workers (default: ${DEFAULT-VALUE})"
)
int maxWorkers = Runtime.getRuntime().availableProcessors();
public void setMaxWorkers(int workers) {
maxWorkers = workers;
Copy link
Member

Choose a reason for hiding this comment

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

This could also use a minimal validation check that workers > 0 as in bioformats2raw

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in dda535a.

@melissalinkert melissalinkert merged commit 8862cd4 into glencoesoftware:master Apr 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

2 participants