- Created on Friday, 29 March 2013 22:51
- Last Updated on Saturday, 30 March 2013 00:19
- Written by Batuhan Osmanoglu
- Hits: 3828
A new addition to DORIS SARtools: floatmask
DORIS comes with many useful small applications to assist dealing with SAR imagery. In ADORE-DORIS cpxfiddle is used extensively. In order to add mask generation support to ADORE, I modified the floatmult.cc code to generate floatmask: a tool to generate binary masks from float files.
The floatmask.cc can be compiled the same way floatmult.cc does. The updated Makefile and the sourcecode for floatmask.cc is available here. To install using the modified Makefile, make your changes to it (i.e. INSTALL_DIR etc.) and replace it with the original one in the SARtools folder. Also add the floatmask.cc in the SARtools folder. Now all you need to do should be:
configure; make; sudo make install
If you like to compile it manually you can use the following command:
g++ -o floatmask floatmask.cc
Then run the command and you should get the help message shown below:
Program: ./floatmask pixelwise mask generation from a float file. Generate mask from float files see also: floatmult, cpxmult, flapjack, cpxfiddle... USAGE: ./floatmask infile1 gt|lt|eq [threshold] EXAMPLE: ./floatmask interfero.coh lt 0.4 default threshold is 0.5 output file == infile1.gt|lt|eq.threshold exit levels: 0:ok; -1: wrong input; 1:ifile; 2:ofile.
As you can see floatmask takes three parameters. The input file, an operator which is limited to greater than (gt), less than (lt) and equal (eq), and the threshold. The output file is automatically named by adding the operation and threshold to the end of the file as a suffix.
I am hoping that floatmask will be available with the next official DORIS release. This way you will be able to use ADORE's mask generation tools.