You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add utility wrapped functions to itk.Matrix (and itk.VariableSizeMatrix). And a str function to print them.
This would also ease the manipulation of itk matrices.
instead of having to GetVnlMatrix().set_ to set/get the data. Something like itkmatrix[0][1] = 12 would be helpful as well.
Here I show an example image.GetDirection()
Steps to Reproduce
try:
fromurllib.requestimporturlretrieveexceptImportError:
fromurllibimporturlretrieveimportosimportitk# Download data (3D)file_name='005_32months_T2_RegT1_Reg2Atlas_ManualBrainMask_Stripped.nrrd'ifnotos.path.exists(file_name):
url='https://data.kitware.com/api/v1/file/564a5b078d777f7522dbfaa6/download'urlretrieve(url, file_name)
image=itk.imread(file_name)
print(image.GetDirection())
Expected and actual behavior
Expected that: print(image.GetDirection()) shows the content of the matrix, instead of:
<itkMatrixPython.itkMatrixD33; proxyof<SwigObjectof type 'itkMatrixD33 *'at0x7fb35d6c5c60>>
The text was updated successfully, but these errors were encountered:
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Add utility wrapped functions to itk.Matrix (and itk.VariableSizeMatrix). And a str function to print them.
This would also ease the manipulation of itk matrices.
instead of having to
GetVnlMatrix().set_
to set/get the data. Something likeitkmatrix[0][1] = 12
would be helpful as well.Here I show an example
image.GetDirection()
Steps to Reproduce
Expected and actual behavior
Expected that:
print(image.GetDirection())
shows the content of the matrix, instead of:The text was updated successfully, but these errors were encountered: