kvis()
kview()
koords()
kpvslice()
krenzo()
kshell()
xray()
kslice_3d()
PDL::Graphics::Karma - interface to Karma visualisation applications
Can send PDL 2D/3D data to kview, xray, kslice_3d, etc...
Data is transferred using shared memory when available on the OS (and segments big enough - e.g. Linux but not Solaris unless tuned) so ought to be very fast.
You can say
perldl> kim $a, {App=>'xray'}
to send to a specific viewer and/or
perldl> kim $a, {BB=>[0,50,-100,100]}
to specify the bounding box in world coordinates (here for a 2D image) or just
perldl> kim $a
to reuse the last viewer.
You can start the viewers from PDL.
For further info about Karma see http://www.atnf.csiro.au/karma. The binary distribution can be downloaded from http://www.atnf.csiro.au/karma/ftp.html.
use PDL::Karma; kview; kim $data;
Sends piddle data array to an external Karma application for viewing
kim($pdl, [$karma-app, $lut])
Sends $pdl data to Karma application viewer. Remembers the last one used [default: kview].
kstarted([$karma-app])
Tests if a Karma application is running.
It tries to connect to the karma application, returns 1 on success, 0 otherwise
Can be used to check if a karma application has already been started, e.g.
xray unless kstarted 'xray';
krgb($lut, [$karma-app])
Sends RGB image to an external Karma application for viewing
Does not change current default viewer.
kvis()
Starts external Karma application kvis
kvis([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
kview()
Starts external Karma application kview
kview([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
koords()
Starts external Karma application koords
koords([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
kpvslice()
Starts external Karma application kpvslice
kpvslice([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
krenzo()
Starts external Karma application krenzo
krenzo([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
kshell()
Starts external Karma application kshell
kshell([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
xray()
Starts external Karma application xray
xray([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
kslice_3d()
Starts external Karma application kslice_3d
kslice_3d([OPTIONS])
perldl> kview (-num_col => 42) perldl> xray
Signature: (x(); y(); r(); ell(); PA(); fill(); int id(); char* karma_app; char* colour; int coordtype; int dotext)
Overlay graphics markers on a Karma application (e.g. kview)
koverlay $x, $y, {Options...}
Currently the only markers supported are ellipses. The default is a circle of radius 10 units,
$x = 10*xvals(10); koverlay $x, sqrt($x), {Radius=>$x/3, Colour=>'green', App=>'kpolar'}
Radius - [piddle] specify radius of ellipses (major axis if ellipse). Default = 10 units. Ellip - [piddle] specify ellipticity of ellipses. Default = 0 i.e. circle. PA - [piddle] specify principle axis (degrees rotation anticlockwise from the Y axis). Default. ID - [piddle] Numeric integer id labels to apply. Colour - [string] Colour name for overlay (e.g. 'red'). Default = 'blue' App - [string] name of Karma app to send too Fill - [piddle] whether outlines are filled (0 or 1). (Note filled, ellipses are not yet available in Karma). Coords - [string] "World" or "Pixel" - type of coordinates for x/y/r. Note pixel implementation rounds to nearest pixel due to Karma overlays not supporting proper IMAGE_PIXEL coordinates.
Return cursor position from a Karma application (e.g. kview/xray)
($x,$y) = kcur($ch, {App=>'karma-app',Coords=>"World|Pixel"})
This function connects to a Karma application and returns the ($x,$y) position and the character typed ($ch) by the user. By default world coordinates are returned.
print kcur {App=>"kview", Coords=>"World"}
Copyright (C) 1997-2001 Christian Soeller, Karl Glazebrook. Reproducing documentation from the pdl distribution in any way that does not include a statement telling who the original authors are is forbidden. Reproducing and/or distributing the documentation in any form that alters the text is forbidden. This module is free software and can be distributed under the same terms as PDL itself.