Shape Invariant Modelling of Trial Based FMRI Data