-
Hi to everyone, I have a dataset of CT scans saved as a .tiff file. The data are stored in a particular way needing a customised Dataset class which is an extension of torch.utils.data.Dataset. The getitem function of my class loads the data and applies the required transformations. When I load the data I have a torch.tensor of size x,y,z (meaning no channel dimensions). The transforms that I apply are:
But I get the error: ValueError: Metadata not available and channel_dim=None, EnsureChannelFirst is not in use. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @cugwu, thanks for your interest here.
Hope it helps, thanks! |
Beta Was this translation helpful? Give feedback.
Hi @cugwu, thanks for your interest here.
You can specify the
channel_dim
in theEnsureChannelFirst
.Hope it helps, thanks!