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

Support itk.Matrix to NumPy array support #1122

thewtex opened this issue Jul 26, 2019 · 1 comment


Copy link

commented Jul 26, 2019

This is important for setting the direction cosines on an itk.Image, for example.



This comment has been minimized.

Copy link
Member Author

commented Aug 2, 2019

This is already available in ITK 5.0. e.g.:

import itk
import numpy as np

image = itk.Image.New()
matrix = image.GetDirection()
array = itk.array_from_matrix(matrix)
matrix = itk.matrix_from_array

#1122 additionally supports setting an image's Direction with a NumPy Array.

@thewtex thewtex self-assigned this Aug 9, 2019

@thewtex thewtex added this to the ITK v5.1b01 milestone Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
1 participant
You can’t perform that action at this time.