File tree 2 files changed +6
-2
lines changed 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -150,8 +150,10 @@ def __init__(
150
150
151
151
if MetaKeys .SPACE not in self .meta :
152
152
self .meta [MetaKeys .SPACE ] = SpaceKeys .RAS # defaulting to the right-anterior-superior space
153
+ if MetaKeys .EVALUATED not in self .meta :
154
+ self .meta [MetaKeys .EVALUATED ] = True
153
155
if MetaKeys .ORIGINAL_CHANNEL_DIM not in self .meta :
154
- self .meta [MetaKeys .ORIGINAL_CHANNEL_DIM ] = 0 # defaulting to channel first
156
+ self .meta [MetaKeys .ORIGINAL_CHANNEL_DIM ] = "no_channel" # defaulting to channel first
155
157
156
158
@property
157
159
def evaluated (self ) -> bool :
Original file line number Diff line number Diff line change @@ -81,7 +81,9 @@ def test_check(self):
81
81
with self .assertRaises (ValueError ): # not MetaTensor
82
82
EnsureChannelFirst (add_channel_default = False )(im )
83
83
with self .assertRaises (ValueError ): # no meta
84
- EnsureChannelFirst (add_channel_default = False )(MetaTensor (im ))
84
+ test_case = MetaTensor (im )
85
+ test_case .meta .pop ("original_channel_dim" )
86
+ EnsureChannelFirst (add_channel_default = False )(test_case )
85
87
with self .assertRaises (ValueError ): # no meta channel
86
88
EnsureChannelFirst (add_channel_default = False )(im_nodim )
87
89
You can’t perform that action at this time.
0 commit comments