Convert a .txt 16 bit into a 16 bit image

CV_64F is defined to be 6. what did you expect depth() to return?

and where is your code that does the imwrite?