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

Move VTK utilities to sub-module #28

Merged
merged 2 commits into from
Jul 3, 2023
Merged

Conversation

blowekamp
Copy link
Member

@blowekamp blowekamp commented May 22, 2023

Move sitk2vtk to vtk submodule

Removed the import of the large vtk package when importing Simpleitk.utilities. This can improve performance when vtk is not needed when using other provided utilities. This follow the pattern of other optional dependencies for the Utilities.

@blowekamp blowekamp requested review from zivy and dave3d May 22, 2023 15:02
@blowekamp blowekamp changed the title Vtk module Move VTK utilities to sub-module May 22, 2023
@blowekamp blowekamp force-pushed the vtk_module branch 3 times, most recently from fca5faf to b8a9d9e Compare July 3, 2023 15:02
The following import no longer works:

from SimpleITK.utilities import sitk2vtk

This needs to be changed to:

from SimpleITK.utilities.vtk import sitk2vtk

Removed the import of the large vtk package when importing
Simpleitk.utilities. This can improve performance when vtk is not
needed when using other provided utilities. This follow the pattern of
other optional dependencies for the Utilities.
@blowekamp
Copy link
Member Author

@dave3d I thought this PR was merged already. This PR move the vtk functions a bit so that the vtk module is not imported when the utilities package is imported.

@blowekamp blowekamp merged commit 78671f7 into SimpleITK:main Jul 3, 2023
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