Up: Component summary Component

CSV2Image

Create an image visualization from CSV file.

This component can be used to create a bitmap image of any CSV file, where a column is the X coordinate of the pixel [0-width], and another is the Y coordinate of the pixel [0-height] and the given column is interpreted as intensity. Intensities are normalized for maximal contrast or with given "iMax" and "iMin" values.

The source file can be also of LinkedList format, where each row contains a tuple of coordinates.

For multicolor images, run for each channel, and join grayscale images with other components, like MergeImage or ImageMagick.

Version 1.2
Bundle anima
Categories Image Transformation
Authors Ville Rantanen (ville.rantanen@helsinki.fi)
Issue tracker View/Report issues
Requires Python ; python-scipy (DEB) ; python-imaging (DEB)
Source files component.xml CSV2Image.py
Usage Example with default values

Inputs

Name Type Mandatory Description
in CSV Mandatory Source data.
reference ImageList Optional Image files that are used to autodetect the dimensions. Image names must match fCol names.

Outputs

Name Type Description
out ImageList Resulting images in a folder.
frequency ImageList Frequency of data points. If each coordinate exists only once, the image is full of 1, i.e. almost black. (0-255)

Parameters

Name Type Default Description
alpha boolean true Mark unused pixels with transparent pixel.
color boolean false Create a pseudo colored image for pixel method.
fCol string "File" Column to use the name of the file
height float 0 Force the height of the image. Defaults to autodetect (0).
iMax float 0 Value in the vCol column that is normalized as maximum. If iMin and Imax are equal values, contrast is streched to maximum.
iMin float 0 Value in the vCol column that is normalized as minimum. If iMin and Imax are equal values, contrast is streched to maximum.
method string "pixel" "pixel" method draws a single pixel with value from vCol. "linkedlist" method draws a line between pairs of xCol and yCol. NOTE xCol and yCol must be presented in format xCol="X1,X2" and two columns of data is needed / axis
vCol string "" Column to use for intensity. If several values exist for the same coordinate, a mean is taken. If left empty, white color for the pixel is used.
width float 0 Force the width of the image. Defaults to autodetect (0).
xCol string "X" Column to use for X coordinate. Integers only.
yCol string "Y" Column to use for Y coordinate. Integers only.

Test cases

Test case Parameters IN
in
IN
reference
OUT
out
OUT
frequency
case1 properties in (missing) out frequency

vCol=Intensity,
color=false,
xCol=X pixel,
yCol=Y pixel

case2 properties in (missing) out frequency

vCol=Intensity,
color=true,
height=60,
width=60,
xCol=X pixel,
yCol=Y pixel


Generated 2018-12-18 07:42:13 by Anduril 2.0.0