It depends a bit how you are loading the data.
If you can create a 3D tensor of the DICOM volume, you should be able to slice the tensor directly.
However, if seems you would like to apply some data augmentation on the volume directly.
If that’s the case, have a look at MONAI 44 which provides some processing and augmentation techniques for medical data.