Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

pdl::graphics2d(3pm) [debian man page]

Graphics2D(3pm) 					User Contributed Perl Documentation					   Graphics2D(3pm)

NAME
PDL::Graphics2D - An object oriented interface to PDL graphics SYNOPSIS
use PDL::Graphics2D; $win = PDL::Graphics2D->new(<Interface>, <Options>); $w = imag2d( $image, 'Title Here', ... ); DESCRIPTION
This is an umbrella class allowing for a simple interface to all plotting routines in PDL. On its own it does not do any work it merely passes information to the appropriate class. Ideally this should probably offer a uniform interface to a variety of packages. This requires a lot more work before it is useful I feel, but it can be used already. CONSTRUCTORS
new Create a 2-D graphics object with the requested interface type FUNCTIONS
imag2d Display a 2-D image in a figure window imag2d() creates a plain FreeGLUT OpenGL window and displays the input image with 1:1 aspect ratio for pixels. The window resize is constrained to the actual ratio of the image dimensions. The initial display size is currently a 200x200 window to prevent things from being too small by default. The image to display can have dimensions ($c,$M,$N) where for $c==4 the display is in GL_RGBA, for $c==3 the display is GL_RGB, for $c==2 the display is GL_LUMINANCE_ALPHA, and for $c==1 or for for dimensions ($M,$N) then the display is GL_LUMINANCE. This routine does not yet thread but multiple images may be viewed at the same time in separate windows by multiple calls to imag2d(). TriD graphics visualization windows and the imag2d() windows may be created and used independently. NOTE: If you are twiddling a TriD window, the imag2d() windows are active as well. If you call twiddle() the sub, only the imag2d() windows will update correctly. $window_id = imag2d($image, $name, $zoom, $x_off, $y_off); creates a new image figure window from the input piddle with the given title, zoom factor, and position (if possible) $window_id - may be used to refer to the figure window $image - 2D image piddle with at least 2 or 3 dimensions e.g. [M,N], [1,M,N], [2,M,N], [3,M,N], [4,M,N] $name - the name to use for the figure window (optional) $zoom - desired (float) pixel zoom factor (optional) ($x_off, $y_off) - desired window pixel position (optional) with (0,0) as the top left pixel of the display use PDL::Graphics2D; # imports imag2d() and twiddle() $a = sequence(64,48,3); # make test RGB image $a = $a->mv(2,0); # color must be dim(0) with size [0..4] $a /= $a->max; # pixel values in [0.0,1.0] $a = sin(10*$a); $w1 = imag2d($a); # with parens... $w2 = imag2d $a->sqrt; # or without $w3 = imag2d $a**2; imag2d_update Update an existing imag2d window with new piddle data $image = random(3,64,48)/2 + 0.25; # random pixel image $win = imag2d($image); # create original image display imag2d_update($win, $image->sequence/$image->nelem); # update data "imag2d_update" allows one to update an "imag2d" display window by replacing the associated image data with new contents. The new image data must be the same type and shape as the previous. Eventually, we would like to implement this via some sort of dataflow that would be transparent to the user. twiddle Enable GUI interaction with a FreeGLUT display window. twiddle(); Runs the FreeGLUT event loop so window GUI operations such as resize, expose, mouse click,.. work perl v5.14.2 2012-02-10 Graphics2D(3pm)

Check Out this Related Man Page

xwud(1X)																  xwud(1X)

NAME
xwud - image displayer for X SYNOPSIS
xwud [-in file] [-noclick] [-geometry geom] [-display display] [-new] [-std <maptype>] [-raw] [-vis <vis-type-or-id>] [-help] [-rv] [-plane number] [-fg color] [-bg color] OPTIONS
If a bitmap image (or a single plane of an image) is displayed, this option can be used to specify the color to display for the 0 bits in the image. This option allows you to specify the server to connect to; see X(1X). If a bitmap image (or a single plane of an image) is displayed, this option can be used to specify the color to display for the 1 bits in the image. This option allows you to specify the size and position of the window. Typically you will only want to specify the position, and let the size default to the actual size of the image. Print out a short description of the allowable options. This option allows the user to explicitly specify the input file on the command line. If no input file is given, the standard input is assumed. This option forces creation of a new colormap for displaying the image. If the image characteristics happen to match those of the display, this can get the image on the screen faster, but at the cost of using a new colormap (which on most displays will cause other windows to go technicolor). Clicking any button in the window will terminate the application, unless this option is specified. Termination can always be achieved by typing 'q', 'Q', or ctrl-c. You can select a single bit plane of the image to display with this option. Planes are numbered with zero being the least significant bit. This option can be used to figure out which plane to pass to xpr(1X) for printing. This option forces the image to be displayed with whatever color values happen to currently exist on the screen. This option is mostly useful when undumping an image back onto the same screen that the image originally came from, while the original windows are still on the screen, and results in getting the image on the screen faster. If a bit- map image (or a single plane of an image) is displayed, this option forces the foreground and background colors to be swapped. This may be needed when displaying a bitmap image which has the color sense of pixel values 0 and 1 reversed from what they are on your display. This option causes the image to be displayed using the specified Standard Colormap. The property name is obtained by converting the type to upper case, prepending RGB_, and appending _MAP. Typical types are best, default, and gray. See xstdcmap(1X) for one way of creating Stan- dard Colormaps. This option allows you to specify a particular visual or visual class. The default is to pick the "best" one. A particu- lar class can be specified: StaticGray, GrayScale, StaticColor, PseudoColor, DirectColor, or TrueColor. Or Match can be specified, meaning use the same class as the source image. Alternatively, an exact visual id (specific to the server) can be specified, either as a hexadeci- mal number (prefixed with 0x) or as a decimal number. Finally, default can be specified, meaning to use the same class as the colormap of the root window. Case is not significant in any of these strings. DESCRIPTION
The xwud program is an X Window System image undumping utility. xwud allows X users to display in a window an image saved in a specially formatted dump file, such as produced by xwd(1X). ENVIRONMENT
To get default display. FILES
X Window Dump File format definition file. SEE ALSO
xwd(1X), xpr(1X), xstdcmap(1X), X(1X) AUTHOR
Bob Scheifler, MIT X Consortium xwud(1X)
Man Page