Non-destructively imaging and exploiting the degradation of hydrogels.