-
I have a part of my program where I load in an image manually and want to run it through my SlidingWindowInferer. With monai 0.8.1 I used to add a channel dimension with AddChannel to the (3D) image, so the Inferer works. Since upgrading to 1.01 this stopped working, but adding another channel (as a mock batch dimension) made it work again. With the deprecation warning for AddChannel, however, this would stop working in the future and EnsureChannelFirst is not meant to do the same thing. So I wonder, if there is a case for keeping AddChannel, or is it unintended that SlidingWindowInferer only works with a batched input? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @demcbs, if you don't have channel dim, I think you could use |
Beta Was this translation helpful? Give feedback.
Hi @demcbs, if you don't have channel dim, I think you could use
EnsureChannelFirst(channel_dim="no_channel")
to do the same thing withAddChannel
.Hope it can help you, thanks!