Ben Stokes said he set himself fitness goals to remain positive throughout his rehabilitation from injury.