Skip to content

ENH: Add fps option to ConvertImageToUSD#59

Merged
aylward merged 2 commits into
Project-MONAI:mainfrom
aylward:fpsForConvertImageToUSD
May 22, 2026
Merged

ENH: Add fps option to ConvertImageToUSD#59
aylward merged 2 commits into
Project-MONAI:mainfrom
aylward:fpsForConvertImageToUSD

Conversation

@aylward
Copy link
Copy Markdown
Collaborator

@aylward aylward commented May 22, 2026

No description provided.

Copilot AI review requested due to automatic review settings May 22, 2026 16:47
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 22, 2026

Warning

Rate limit exceeded

@aylward has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 5 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ef5d7112-31db-4055-a28d-f6a47313f5ec

📥 Commits

Reviewing files that changed from the base of the PR and between 1088f39 and 6766f6f.

📒 Files selected for processing (6)
  • docs/API_MAP.md
  • docs/cli_scripts/byod_tutorials.rst
  • src/physiomotion4d/cli/convert_image_to_usd.py
  • src/physiomotion4d/workflow_convert_image_to_usd.py
  • tests/test_cli_smoke.py
  • tests/test_workflow_convert_image_to_usd.py
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a configurable playback frame rate to the Image-to-USD workflow so animated USD outputs can set TimeCodesPerSecond consistently with user expectations.

Changes:

  • Add times_per_second parameter to WorkflowConvertImageToUSD and forward it to ConvertVTKToUSD.
  • Expose the setting in the CLI as --fps (mapped to times_per_second) and add smoke tests verifying help + argument forwarding.
  • Update BYOD docs and regenerate docs/API_MAP.md to reflect the public API change.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/physiomotion4d/workflow_convert_image_to_usd.py Adds times_per_second to the workflow init and forwards it during USD generation.
src/physiomotion4d/cli/convert_image_to_usd.py Adds --fps CLI argument and passes it into the workflow as times_per_second.
tests/test_workflow_convert_image_to_usd.py New unit test asserting _create_usd_files() forwards times_per_second to ConvertVTKToUSD.
tests/test_cli_smoke.py New smoke tests ensuring --fps appears in help and is forwarded correctly.
docs/cli_scripts/byod_tutorials.rst Documents the new --fps option and Python times_per_second usage.
docs/API_MAP.md Regenerated API map reflecting the updated workflow signature and added tests.
Comments suppressed due to low confidence (1)

src/physiomotion4d/workflow_convert_image_to_usd.py:75

  • Adding times_per_second before log_level in the __init__ signature is a backwards-incompatible change for any callers that pass log_level (or later args) positionally—those values will now be interpreted as FPS instead. To preserve compatibility, consider making times_per_second keyword-only (e.g., insert a * before it) or move it after the existing parameters so positional argument order is unchanged.
    def __init__(
        self,
        input_filenames: list,
        contrast_enhanced: bool,
        output_directory: str,
        project_name: str,
        reference_image_filename: Optional[str] = None,
        number_of_registration_iterations: Optional[int] = 1,
        segmentation_method: str = "ChestTotalSegmentator",
        registration_method: str = "ICON",
        times_per_second: float = 24.0,
        log_level: int | str = logging.INFO,
        save_registered_images: bool = True,
        save_registration_transforms: bool = True,
        save_labelmaps: bool = True,

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 31.23%. Comparing base (1088f39) to head (6766f6f).

Files with missing lines Patch % Lines
...rc/physiomotion4d/workflow_convert_image_to_usd.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #59      +/-   ##
==========================================
+ Coverage   30.77%   31.23%   +0.45%     
==========================================
  Files          50       50              
  Lines        6826     6828       +2     
==========================================
+ Hits         2101     2133      +32     
+ Misses       4725     4695      -30     
Flag Coverage Δ
integration-tests 31.12% <50.00%> (?)
unittests 31.22% <50.00%> (+0.44%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aylward aylward merged commit 7c9a379 into Project-MONAI:main May 22, 2026
11 of 12 checks passed
@aylward aylward deleted the fpsForConvertImageToUSD branch May 22, 2026 17:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants