1.3D图像调整大小
def resize_3d_image_batch(images, size):
resized_images = np.zeros((len(images), *size))
for i in range(len(images)):
resized_images[i] = resize_3d_image(images[i], size)
return resized_images
# 示例
moving_image_shape = (64, 64, 64, 1)
fixed_image_shape = (64, 64, 64, 1)
resized_moving_image = resize_3d_image_batch(moving_image, moving_image_shape)
resized_fixed_image = resize_3d_image_batch(fixed_image, fixed_image_shape)