You can use the CropVolume module first to create a buffer area around the volume so the rotation won’t crop. You can eyeball this and set the ROI to fit, or in your code you could calculate the needed size based on the rotation. This example should help.