fixed a bug of return value of GetZSampleValue and added size type