Converter

Overview

Converter is a little util to convert an input dataset from one format to another. Converter supports several different formats.

Synopsis

Usage: ./pre02_converter.sh  <input_file>  [-of:output_file]
where:
   <input_file>        the input file to convert
   -of:output_file     (optional) write result to output_file (default: stdout)

Note that Converter is an interactive program, so after specifying the input file, you'll have to choose from a menu.

Examples

Convert .basenum to .rcf

./pre02_converter.sh sample/laszlo.basenum -of:/tmp/laszlo.rcf

That is, you want to convert the file sample/laszlo.basenum. The output will be written to /tmp/laszlo.rcf. Warning! The result is not yet written, you'll have to choose your actions from a menu!

Steps to follow:

  • choose option '3' (convert to .rcf)
  • choose 'w' ou 'w!' to write the result to the specified output
  • choose 'q' to quit

Convert .basenum to a graphical image

You can convert a binary context to a graphical image to check the density and the distribution of the dataset.

Steps to follow (through a concrete example):

  • ./pre02_converter.sh sample/laszlo.basenum
  • choose '6' (PBM conversion)
  • choose 'of' (we want to define the output file)
  • choose 'n' (new file)
  • type /tmp/out (no extension is needed)
  • choose 'w' or 'w!'
  • choose 'q' to quit

The result is written to /tmp/out.pbm. This file can be opened with Gimp for instance:

20091112_out.gif

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License