File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 12
12
from os import cpu_count
13
13
from functools import partial
14
14
from pathlib import Path
15
- from typing import Callable , TypeVar
15
+ from typing import Callable , TypeVar , Union
16
16
17
17
import numpy as np
18
18
from nibabel .loadsave import load as _nbload
@@ -144,8 +144,8 @@ async def _apply_serial(
144
144
145
145
def apply (
146
146
transform : TransformBase ,
147
- spatialimage : str | Path | SpatialImage ,
148
- reference : str | Path | SpatialImage = None ,
147
+ spatialimage : Union [ str , Path , SpatialImage ] ,
148
+ reference : Union [ str , Path , SpatialImage ] = None ,
149
149
order : int = 3 ,
150
150
mode : str = "constant" ,
151
151
cval : float = 0.0 ,
@@ -154,7 +154,7 @@ def apply(
154
154
dtype_width : int = 8 ,
155
155
serialize_nvols : int = SERIALIZE_VOLUME_WINDOW_WIDTH ,
156
156
max_concurrent : int = min (cpu_count (), 12 ),
157
- ) -> SpatialImage | np .ndarray :
157
+ ) -> Union [ SpatialImage , np .ndarray ] :
158
158
"""
159
159
Apply a transformation to an image, resampling on the reference spatial object.
160
160
You can’t perform that action at this time.
0 commit comments