Templated on pixel type