Median filter - 3D images

Hello, I am new on image processing world. I am trying to perform a median filter only in z-axis. I have 3D images taken with FIB-SEM technique.