-
Notifications
You must be signed in to change notification settings - Fork 3
Bdv update library #118
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
base: devel
Are you sure you want to change the base?
Bdv update library #118
Conversation
* Add optional list_files parameter to define_dataset_manual * Update processing options to use bdv.ProcessingOptions * Improve logging for manual dataset definition options * Refactor fuse_dataset_bdvp parameters for clarity * Introduce join_files_with_channel_suffix function for file handling
ehrenfeu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As discussed, please remove the changes to fuse_dataset_bdvp from this PR and merge them into #106.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #118 +/- ##
====================================
- Coverage 25% 24% -1%
====================================
Files 25 25
Lines 1688 1733 +45
====================================
+ Hits 421 423 +2
- Misses 1267 1310 +43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Use the Python function parameter name ('source_directory')
instead of the parameter name used by the IJ macro.
ehrenfeu
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚨 Please do a git pull before, as I made a few changes to the PR already! 🚨
I added several comments to be addressed here before we can merge this.
|
|
||
| if definition_opts is None: | ||
| definition_opts = DefinitionOptions() | ||
| definition_opts = bdv.DefinitionOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is expected to fail as DefinitionOptions is a class defined in this very file here.
➡️ Nicely illustrates the need for unit tests.
|
|
||
| if not processing_opts: | ||
| processing_opts = ProcessingOptions() | ||
| processing_opts = bdv.ProcessingOptions() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as above.
| Examples | ||
| -------- | ||
| fuse_dataset_bdvp(xml_input, cs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This example doesn't provide any additional information as it is just the most simple case of how to call this function.
Possible options:
- either remove the example or
- provide additional value by adding code that shows at least how to construct the two parameters used here
- if possible also have a more complex example that uses more of the function's parameters
Note: please use the right syntax for docstring examples (they need to be prefixed with ">>> ") in order to have them rendered correctly, see the numpydoc format documentation, section "Examples" for details.
| ).get() | ||
|
|
||
|
|
||
| def join_files_with_channel_suffix(files, nchannels): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Several requests here:
- Please move this into
imcflibs.pathtoolsas this is not BDV related and potentially useful for other parts as well. - Any
importcommand should be at the module top, unless there is a very good reason. - Please fix the docstring syntax to use single backticks instead of doubled backticks: https://pdoc.dev/docs/pdoc.html#link-to-other-identifiers
This pull request introduces several enhancements and refactorings to the
src/imcflibs/imagej/bdv.pymodule, focusing on improving dataset definition and export workflows, as well as increasing flexibility and maintainability. The most significant updates include support for directly passing file lists to the manual dataset definition, improved options for exporting datasets to OME-TIFF, and the addition of a utility for channel-suffixed file naming.Enhancements to dataset definition and export:
list_files) directly to thedefine_dataset_manualfunction, enabling the use of explicit file lists in "show_list" mode rather than relying solely on file patterns. The options string is now constructed accordingly. [1] [2] [3]fuse_dataset_bdvpfunction to allow specifying the number of resolution levels, LZW compression, and the fusion method, and updated its parameter names and documentation for clarity and flexibility. The function now also waits for the export command to complete.Utility and code quality improvements:
join_files_with_channel_suffixto generate lists of filenames with channel suffixes, facilitating workflows where each channel is stored in a separate file.resave_as_h5function to use the correct processing options object and changed the ImageJ command to "Resave as HDF5 (local)" for better accuracy. [1] [2]Imports and minor cleanups:
AlphaFusedResampledSourceto support the new fusion method default, and made minor whitespace and code cleanups. [1] [2]