msk,measure: imagestacks with type bool and float respectively dz: relative shift in stack positions at which pixel intensity is measured return shape: (#time points, #pixels in msk, # channels)