# 2.2.6. imageData



## Purpose

Generate PNG image from data in given column with fastest varying index along the width. Alternatively, use overall ASCIItable as 2D data set. The intrinsic coordinate frame used by imageData is scanline-derived with the origin in the top-left corner, x pointing to the right, and y pointing downward.

Operates on given file(s) or STDIN STDOUT.

## Usage

> imageData options [file(s)]


## Options

--label / -l string [ all ]
column containing data
--range / -r float float [ auto ]
range of data values (min max)
--dimension / -d int int [ native ]
dimension of data field (width height)
--abs [ False ]
use absolute data values
--log [ False ]
use natural logarithm of data values
--fliplr [ False ]
flip image around vertical axis
--flipud [ False ]
flip image around horizontal axis
--log [ False ]
use natural logarithm of data values
--color string [ gray ]
color scheme to use for values
--invert [ False ]
invert color scheme
--show [ False ]
show resulting image
--crop int int int int [ 0 0 0 0 ]
pixels cropped on left, right, top, bottom of image
--pixelsize / -N int [ 1 ]
pixels per data point in image along x and y
--pixelsizex / -x int [ 1 ]
pixels per data point in image along x
--pixelsizey / -y int [ 1 ]
pixels per data point in image along y

## Example

### Single data column

Suppose we have an ASCIItable that contains a column of two-dimensional data as in » type « below. The additional columns » x « and » y « are not required and not considered either, but correspond to the interpretation of the data sequence based on --dimension 3 2, i.e. 3 points along x for each of two rows along y.
 Figure 1: Exemplary output of the » type « column as two-dimensional image.
1 head
x y type
1 1 1
2 1 1
3 1 2
1 2 1
2 2 3
3 2 0


With
> imageData --label type --pixelsize 10 --dimension 3 2

the output shown in Figure 1 results.

### Two-dimensional data array

For an ASCIItable that directly contains a two-dimensional representation of a data field, such as
 Figure 2: Exemplary output of the 8 by 7 data array as (distorted) image.
0 head
-1    0 0 0 0 0 0 0
-0.33 0 0 2 0 2 0 0
0.33  0 0 0 0 0 0 0
1     0 0 0 2 0 0 0
1.67  0 1 0 0 0 1 0
2.33  0 0 2 2 2 0 0
3     0 0 0 0 0 0 0


the processing with
> imageData --pixelsizex 10 --pixelsizey 15 --color bluered --invert --range -1 3

yields the output shown in Figure 2.

Topic attachments
I Attachment Action Size Date Who Comment
png image_type.png manage 114 bytes 01 May 2015 - 01:58 PhilipEisenlohr output of imageData
png face.png manage 370 bytes 01 May 2015 - 17:55 PhilipEisenlohr output of imageData
Topic revision: r4 - 24 Nov 2015, PhilipEisenlohr

• News
21 Jan 2019
DAMASK overview paper finally published with full citation information available
01 Dec 2018
17 Sep 2018
CMCn2018 & DAMASK user meeting to be hosted at Max-Planck-Institut für Eisenforschung
22 May 2018
Release of version v2.0.2
01 Sep 2016
CMCn2016 & DAMASK user meeting to be hosted at Max-Planck-Institut für Eisenforschung
25 Jul 2016
Release of version v2.0.1
08 Mar 2016
Release of version v2.0.0
22 Feb 2016
New webserver up and running
09 Feb 2016
Migrated code repository from Subversion to GitLab
17 Dec 2014
Release of revision 3813
14 May 2014
Release of revision 3108
02 Apr 2014
Release of revision 3062
16 Oct 2013
Release of revision 2689
15 Jul 2013
Release of revision 2555
15 Feb 2013
Release of revision 2174
13 Feb 2013
documentation
16 Dec 2012
rendering
23 Nov 2012
Release of revision 1955
15 Nov 2012
Release of revision 1924
01 Nov 2012
Updated sidebar
30 Oct 2012
Significant website updates and content extensions

Copyright by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding DAMASK? Send feedback
§ Imprint § Data Protection