next up previous contents
Next: Creating an image mosaic Up: Image conversions and cropping Previous: Conversions between images and

Converting graphs into pixel data frames

 

gr2fr Convert graph into data frame
-vdata <nodes> graph nodes
-edata <arcs> graph arcs
-dout <pixeldata> data frame containing pixels

This command converts a graph into data frame that contains pixels and colors for plotting the graph using f2i command. A graph structure is defined using two data frames, nodes and arcs. Data frame nodes contains at least three fields having type int or float. First field is considered as horizontal coordinate, second vertical coordinate and third gray level. Other fields may contain some other node related information and are ignored. Data frame arcs contain at least two fields. They must have type int. First field is considered as begin node index (first index is zero) and second field end node index of an arc. Other fields may contain some other arc related information and are ignored.

Example: Assuming that nodes and arcs define a graph, following commands plot the graph.

...
# Convert graph into pixels
NDA> gr2fr -vdata nodes -edata arcs -dout pix
# Convert pixels into image
NDA> f2i -d pix -iout img -bgcol 0 -xsize 256 -ysize 256
Doing grayscale
Image is 256 x 256.
# Show image
NDA> mkgrp g
NDA> bgimg g -img img
NDA> show g


next up previous contents
Next: Creating an image mosaic Up: Image conversions and cropping Previous: Conversions between images and

Anssi Lensu
Tue Jul 23 11:58:18 EET DST 2002