Adding multislice stuff to add into the intensity function.