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

Fix calculator for image data #2928

Merged
merged 2 commits into from
Oct 2, 2023

Conversation

bourdaisj
Copy link
Contributor

@bourdaisj bourdaisj commented Sep 29, 2023

Context

fix #2257

Results

we can now use vtkCalculator with a vtkImageData

Changes

  • Documentation and TypeScript definitions were updated to match those changes

Do not pass point coordinates to formula function in case of vtkImageData input since it relies on the getPoints function which does not exist on vtkImageData.
Also avoid to call getPoints to get number of points, directly use getNumberOfPoints on the input dataset.

PR and Code Checklist

  • semantic-release commit messages
  • Run npm run reformat to have correctly formatted code

Testing

  • This change adds or fixes unit tests
  • Tested environment:
    • vtk.js: master
    • OS: linux
    • Browser: firefox 118.0.1, chrome Version 117.0.5938.132 (Official Build) (64-bit)

do not call getPoints on the input dataset if it not necessary

fix Kitware#2257
@bourdaisj bourdaisj self-assigned this Sep 29, 2023
@bourdaisj bourdaisj requested a review from floryst September 29, 2023 15:17
@bourdaisj
Copy link
Contributor Author

fyi @bruyeret @finetjul

Copy link
Member

@finetjul finetjul left a comment

Choose a reason for hiding this comment

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

LGTM

@bourdaisj bourdaisj force-pushed the fix-calculator-for-image-data branch from 51bff7f to 1c12d59 Compare September 30, 2023 12:01
Copy link
Collaborator

@floryst floryst left a comment

Choose a reason for hiding this comment

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

LGTM

@finetjul finetjul added this pull request to the merge queue Oct 2, 2023
Merged via the queue into Kitware:master with commit 315045a Oct 2, 2023
4 checks passed
@github-actions
Copy link

github-actions bot commented Oct 2, 2023

🎉 This PR is included in version 28.12.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot added the released Automated label label Oct 2, 2023
@bourdaisj bourdaisj deleted the fix-calculator-for-image-data branch January 24, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Automated label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

vtkCalculator fails with vtkImageData as input
3 participants