EnsureChannelFirst after Lambda #7347
aeye-slater
started this conversation in
General
Replies: 1 comment 1 reply
-
Hi @aeye-slater, thanks for your interest here. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I was trying to implement a CLAHE transform using a Lambda Transform.
this is my normal transform for MONAI:
If I add in the Lambda Transform I have to switch to the following:
If I don't split the image and mask up for the ChannelFirst, I get the following error:
ValueError: Unknown original_channel_dim in the MetaTensor meta dict or
meta_dictor
channel_dim.
I checked this and the original_channel_dim is there for both (-1-> image nan->mask) Somehow the lambda is causing an issue.
The only difference is adding the LambdaFunction, so clearly I don't understand something that is being passed from transform to transform as the CLAHE only changes the image part of the metatensor, but somehow kills the ability to EnsureCHannelFirst to work as it previously did. Yes I have a fix, but it just didn't make sense.
Some guidance would be appreciated.
Beta Was this translation helpful? Give feedback.
All reactions