File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
src/deepali/utils/simpleitk Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -50,8 +50,8 @@ def __init__(
5050 if center is None :
5151 origin = (0.0 ,) * ndim
5252 else :
53- offset = np .array (0.5 * n if n > 0 else 0 for n in self ._int_size (size ))
54- rotation = np .array (self . direction ).reshape (ndim , ndim )
53+ offset = np .array ([ 0.5 * n if n > 0 else 0 for n in self ._int_size (size )] )
54+ rotation = np .array (direction ).reshape (ndim , ndim )
5555 scaling = np .diag (spacing )
5656 coords : NDArray = np .asanyarray (center ) - np .matmul (rotation @ scaling , offset )
5757 origin = tuple (float (x ) for x in coords )
@@ -68,7 +68,7 @@ def __init__(
6868 @property
6969 def center (self ) -> Tuple [float , ...]:
7070 r"""Get grid center point coordinates in world space."""
71- offset = np .array (0.5 * n if n > 0 else 0 for n in self .size )
71+ offset = np .array ([ 0.5 * n if n > 0 else 0 for n in self .size ] )
7272 coords : NDArray = self .origin + np .matmul (self .transform [:- 1 , :- 1 ], offset )
7373 return tuple (float (x ) for x in coords )
7474
You can’t perform that action at this time.
0 commit comments