We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5a123f commit 50a1c6eCopy full SHA for 50a1c6e
src/torchio/transforms/transform.py
@@ -9,6 +9,7 @@
9
from typing import Optional
10
from typing import Sequence
11
from typing import Tuple
12
+from typing import TypeVar
13
from typing import Union
14
15
import numpy as np
@@ -49,6 +50,8 @@
49
50
'Superior',
51
)
52
53
+InputType = TypeVar('InputType', bound=TypeTransformInput)
54
+
55
56
class Transform(ABC):
57
"""Abstract class for all TorchIO transforms.
@@ -127,8 +130,8 @@ def __init__(
127
130
128
131
def __call__(
129
132
self,
- data: TypeTransformInput,
- ) -> TypeTransformInput:
133
+ data: InputType,
134
+ ) -> InputType:
135
"""Transform data and return a result of the same type.
136
137
Args:
0 commit comments