Hdf2img: Creation an image from a HDF4 SDS

Language/Format: Numpy, PIL, Python
Application type(s): Data Conversion, Visualization
Related project(s):

Description

This pure-python application creates a 256 colors image of a 2D HDF4 SDS. It supports different colormaps, min/max thresholding, scaling, fill value filtering…

Many output image formats are also supported.

Classes in this package can also be called as python libraries in your own programs :

  • hdf2img.py  : processor for building an image from a HDF dataset
  • data2img.py : processor for building an image from a numpy array

Limitation

  • Only 2D datasets are currently supported

Usage

Usage: hdf2img [options]   

  <infile>             HDF4 input file
  <sds>                Name of the SDS to be drawn
 
Options:
 -h, --help            show this help message and exit
 -o OUTFILE, --output=OUTFILE
                       The output file name. The output image file format
                       will be based on the file extension. If not given,
                       <input-dir>/<input-file-without-   extension>_<sds>.png
                       will be used
 -c COLORMAP, --colormap=COLORMAP
                       The colormap (ocean,bw_linear,red_temp,blue,blue_red,r
                       ainbow,rainbow_white,lidar_nasa) to use or the
                       colormap file name
 -S SCALE, --scale=SCALE
                       The type of scale to use&nbsp;:  linear(default), log
 -m THRESHOLD_MIN, --threshold_min=THRESHOLD_MIN
                       The values smaller than threshold_min will be clipped
                       to it
 -n THRESHOLD_MAX, --threshold_max=THRESHOLD_MAX
                       The values greater than threshold_min will be clipped
                       to it
 -w INVALID, --invalid=INVALID
                       The invalid fill value (optional)
 -u INVALID_IDX, --invalid_idx=INVALID_IDX
                       The invalid fill value colormap index (optional)
 -v, --verbose         Print out processing informations
 -d, --is_palette_index
                       Palette values are a index.
 -x, --overwrite       Overwrite the output file if already existent

Download

Source can be downloaded here :

hdf2img.v1.2.0.tar.gz

Package can be browsed here :

hdf2img

Installation

Installation process is detailed in the README and INSTALL files at the root of the package

Copyright

Copyright (C) 2010 Icare – ICARE web site

Nicolas PASCAL, nicolas.pascal@univ-lille.fr

This program is a free software; you can redistribute it and/or modify it under the terms of the CeCILL Public License as published by www.cecill.info (License version 2 or later).

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL Public License for more details.

You should have received a copy of the CeCILL Public License along with this program; if not, please contact www.cecill.info

For any questions or concerns regarding this program, or general information about the ICARE Project, please email to contact@icare.univ-lille.fr

Author(s): Nicolas Pascal (ICARE)

More news

Development Tools

HDF5 reader: HDF5 files read library in many languages

Language/Sofware: C, Fortran, IDL, MATLAB, Python
Application type(s): Data Read/Write
Related project(s):
Description:
The library contains high-level read functions for HDF5 files in R and MATLAB.
Author(s): Aminata Ndiaye (CGTD)

25.08.2014

Development Tools

SSMIS tools: Useful Python software for reading SSMI binary files

Language/Sofware: Numpy, Python
Application type(s): Data Conversion, Data Read/Write
Related project(s):
Description:
This tool is a reading Python software for SSMI binary files consisting in some headers followed by records with the same pattern (Headers and record patterns are described in text files: ./conf/).
Datasets are returned as Numpy arrays and write in HDF4 file.
Author(s): Nicolas Henriot. Bruno Six (ICARE)

27.02.2014

Development Tools

SSMI_TOOLS: Useful Python software for reading SSMI binary files

Language/Sofware: Numpy, Python
Application type(s): Data Conversion, Data Read/Write
Related project(s):
Description:
This tool is a reading Python software for SSMI binary files consisting in some headers followed by records with the same pattern (Headers and record patterns are described in text files: ./conf/).
Datasets are returned as Numpy arrays and write in HDF4 file.
Author(s): Nicolas Henriot. Bruno Six (ICARE)

26.02.2014

Search