Using vtk libraries for writing in xml/vtk fileformat using fortran

I was wondering if someone would help me on how to use install,use vtk libraries to write data in binary format in fortran. Or, suitable modifications to write in binary format from a fortran code wrting files in .vtk in ASCII format are also welcome. I understand that its very easy to write and have a writer in place, hence was hoping someone would help me out with the binary format. The main problem is the mixed data to be written in vtk binary files, where the keyword phrases are to be in binary.

I would recommend taking a look at VTKFortran ( Since it supports ascii, binary (Base64 encoding) and raw file formats, this should come in useful.