In all cases where one whose material has been used without his knowledge, in order to form a product of a different description, can claim an interest in such product, he has an option to demand either restitution of his material in kind, in the same quantity, weight, measure, and quality, or the value thereof; or where he is entitled to the product, the value thereof in place of the product.