Files Format

Examples of managing the WSxM file format

We are including some simple ANSI-C file examples. The first one (Multiply.exe) is a reverse filter, it opens a WSxM file and multiplies the data by -1 updating the header. Then it writes the output file with the filter applied and the header updated.

The second one (MathFunc.exe) generates the mathematical function f(x,y) = A sin (kx) cos (ky) and writes it in a WSxM file generating a fictitious header with the necessary fields. Also, we include a third example, (FunctionGenerator.exe) that generates two images in an extremely simple WSxM compatible file format. Files with this format can be obtained with WSxM 3.0 or later, by selecting "ASCII Matrix files" or "ASCII XYZ files" in the Save As menu. The first format consists of a very simple header, followed by a heights matrix. The second one allows X,Y,Z triads, from which the image will be generated.

Another example, (MathFunc.exe) shows how to make an easy process in a General Spectroscopy Image (Force Volume or CITS, for example) generating a map with a charasteristic parameter from each curve, for example: the adhesion.

These file formats have been specifically designed to simplify programming for WSxM users. In all the examples, we don't include any makefile, this way they can be compiled in any environment (Windows, DOS, UNIX, ...).

© 2010 Nanotec
Nanotec Electrónica