fix bug in transform of label image