support different data type

Now it only supports unsigned int 16 image data. More data type should be supported.