Replies: 3 comments
-
Hi @p71-23, thanks for raising this one. Could you please create a small piece of code that can help reproduce the issue? Not sure which check cause the issue. Thanks! |
Beta Was this translation helpful? Give feedback.
-
Thanks for your warmly response! class CustomDataset(Dataset): def len(self): def getitem(self, idx): Then, I utilize it as follows: train_transforms = Compose([ However, I encountered the following error: Traceback (most recent call last): I was pleasantly surprised to find that the RandSpatialCropSamplesd function is able to solve this problem, although it can't split based on proportionality like RandCropByPosNegLabeld, but it seems to be able to deal with multi-channel cropping (I'm not really sure, since the final result hasn't been calculated yet) |
Beta Was this translation helpful? Give feedback.
-
Hi @p71-23, I believe
Thanks. |
Beta Was this translation helpful? Give feedback.
-
Does monai have a cropping method for ct\pet multi-channel input? I've only found the RandSpatialCropSamplesd function so far, and it seems that it can only handle single-channel images and the cropping of the corresponding labels.
Error when inputting multiple channels: image and label dimensions do not match.
Beta Was this translation helpful? Give feedback.
All reactions