the pictures a file holds, as an index and not as pixels: a vendor writes its electron images beside the map, and one Oxford file carries a dozen of three megapixels each, so what the map keeps is where they are and what shape they have. h5Image reads one.

Syntax

from mtex.io.h5 import h5Paths
f = h5py.File(mtexdatafile('EMSphinx'))
images = h5ImageIndex(f, *h5Paths(f))

Every picture of the file.

images = h5ImageIndex(f, *h5Paths(f), n=508*955)

Leaving out the columns of a map of n pixels.

Description

A picture is a numeric data set at least 16 pixels on a side: a plane, a plane of three or four colour channels either way round, or a flat run whose size the cell counts of the nearest Header group state. A group is never one. Every picture is a dict of its name, its path, its shape (rows, columns[, channels]) and its dtype. The loaders of the vendors’ HDF5 files store this index as ebsd.meta[‘images’].

Input

f an open h5py file
paths every group and data set of the file, as h5Paths lists them
groups the set of those paths that are groups

Keywords

keyword default description
n 0 the number of measurements of the map; a data set of n rows, or of n values, is a column of the map and no picture

Output

images a list of dicts with the keys name, path, shape and dtype

See also

h5Image, loadEBSD

source

Citing this page. This page is part of the documentation of MTEX, a free and open source MATLAB toolbox for analyzing and modeling crystallographic textures. It was written by The MTEX Developers and is published at https://mtex-toolbox.github.io/h5ImageIndex_py.html. If you use MTEX, or reuse text or figures from this page, in your research, please cite

F. Bachmann, R. Hielscher, H. Schaeben: Texture Analysis with MTEX - Free and Open Source Software Toolbox, Solid State Phenomena 160 (2010), 63-68. 10.4028/www.scientific.net/SSP.160.63

BibTeX
@article{bachmann2010mtex,
  author  = {F. Bachmann and R. Hielscher and H. Schaeben},
  title   = {Texture Analysis with MTEX - Free and Open Source Software Toolbox},
  journal = {Solid State Phenomena},
  volume  = {160},
  pages   = {63-68},
  year    = {2010},
  doi     = {10.4028/www.scientific.net/SSP.160.63},
  url     = {https://doi.org/10.4028/www.scientific.net/SSP.160.63}
}

Other papers describing specific MTEX methods are listed under Publications — please cite the one that best fits your application. The MTEX source code is licensed under the GNU General Public License v2.0; the text and figures of this documentation are licensed under CC BY 4.0, which permits reuse — including by automated systems — provided The MTEX Developers and this page are credited.