Skip to content

Commit

Permalink
BUG: Support multi-component images
Browse files Browse the repository at this point in the history
This is heavily dependent on a fix in ITK:
InsightSoftwareConsortium/ITK#4142
  • Loading branch information
dzenanz committed Aug 8, 2023
1 parent 2532363 commit faccaf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Base/Python/slicer/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2036,7 +2036,7 @@ def itkImageFromVolumeNode(volumeNode):
origin, spacing, directionTuple = _getITKMetadataFromRASAffine(rasAffine)
itkImage.SetOrigin(origin)
itkImage.SetSpacing(spacing)
directionMatrix = np.asarray(directionTuple).reshape((itkImage.ndim, itkImage.ndim))
directionMatrix = np.asarray(directionTuple).reshape((3, 3))
itkImage.SetDirection(itk.matrix_from_array(directionMatrix))

return itkImage
Expand Down

0 comments on commit faccaf8

Please sign in to comment.