Skip to content

Add VTK Visualization Toolkit Plugin #20028

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

Merged
merged 11 commits into from
Apr 19, 2025
Merged

Conversation

guerler
Copy link
Contributor

@guerler guerler commented Apr 16, 2025

Add VTK as Visualization plugin, supporting ply and vtp files. This PR also add the vtpascii and vtpbinary datatypes to the registry.

Test data available at:
http://cdn.jsdelivr.net/gh/galaxyproject/galaxy-test-data/square.plyascii
http://cdn.jsdelivr.net/gh/galaxyproject/galaxy-test-data/horse.plybinary
http://cdn.jsdelivr.net/gh/galaxyproject/galaxy-test-data/square.vtpascii
http://cdn.jsdelivr.net/gh/galaxyproject/galaxy-test-data/human.vtpbinary

vtk

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@guerler guerler marked this pull request as ready for review April 16, 2025 22:37
@guerler guerler requested review from bgruening and removed request for bgruening April 17, 2025 20:35
Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

The VIS is great! I have a few questions about the datatype.

Thanks Sam!

subtype = ""

# Add metadata elements (sorted alphabetically by name).
MetadataElement(name="file_format", default=None, desc="File format", readonly=True, optional=True, visible=True)
Copy link
Member

Choose a reason for hiding this comment

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

What are those file_formats? Should we have subclasses of this for each of the file_format? E.g. can there be tools or Vis that require one of the specific sub-types?

Is unusual to encode file_formats this way I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

file_format here refers to type in the VTP-file, commonly its PolyData. I used file_format because it is used in VTK and PLY but I switched it to type so it aligns with actual attribute name in the VTP-file.

Copy link
Contributor Author

@guerler guerler Apr 18, 2025

Choose a reason for hiding this comment

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

I followed up one more time, and removed file_format/type, instead the blurb is now showing any of the other metadata attributes collected from the dataset e.g.
image

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Works nicely. The test data really helps to test, thanks @guerler!

Copy link
Member

@bgruening bgruening left a comment

Choose a reason for hiding this comment

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

Thanks @guerler works great! The test data in the PR description are helping a lot :)

@guerler guerler merged commit d41d9d3 into galaxyproject:dev Apr 19, 2025
54 of 56 checks passed
@guerler guerler deleted the vtk.000 branch April 19, 2025 17:10
@mvdbeek
Copy link
Member

mvdbeek commented Apr 20, 2025

@guerler
Copy link
Contributor Author

guerler commented Apr 20, 2025

Thank you @mvdbeek, followed-up with #20051 to add the missing new line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants