VrOne/Python Programming
|
ON-LINE REFERENCE DOCUMENTATION CARDINAL SYSTEMS, LLC 386-439-2525
|
VrOne/Python image management routines. More...
Allows management of images in VrOne. Images can
be opened and closed. Information about currently open images can be queried.
Settings for images can be changed, such as brightness, color maps, and
location. Provides methods for converting between ground and image coordinates
and for reading image data.
Allocates an image object and
opens an image.
|
FileName |
Image file name. |
|
|
MakePyra |
Make image pyramids? 0=No
1=Yes(default) |
|
|
ReadWorld |
Read world file? 0=No
1=Yes(default) |
|
|
returns |
(ret) |
|
|
|
ret |
Image sequence number
(0-MaxImgs-1) -1 Could not open file. |
Checks to see if an image is open
|
FileName |
Image name to check. |
|
|
returns |
(ret) |
|
|
|
ret |
0=Image not open,1=Image is open |
Closes an image using index
number.
|
ImgNum |
Image to close. |
Closes an image using image name.
|
FileName |
File name that was used to open
the image. |
Closes all open images
Get index color map for a simgle
image This is the internal colormap for index based images.
|
ImgNum |
Image index number. |
|
|
returns |
(ret) |
|
|
|
ret |
List of 255 RGB color values |
Gets RGB color for a single index
value.
|
ImgNum |
Image index number. |
|
|
Idx |
Color index (0-255) |
|
|
returns |
(Red, Green, Blue) |
|
|
|
Red |
0-255 |
|
|
Green |
0-255 |
|
|
Blue |
0-255 |
Is image index color based.
|
ImgNum |
Image index number to check |
Returns the number of images
currently open.
|
returns |
(ret) |
|
|
|
ret |
Number of images currently open |
Returns the image bit depth for
the image specified.
|
ImgNum |
Image index number. if the image
number is out of range, 0 is returned. |
|
|
returns |
(ret) |
|
|
|
ret |
Image bit depth (8, 16, 24) |
Returns the image width and height
for the image specified.
|
ImgNum |
Image index number. |
|
|
PixIncr |
Pixel increment to retrieve size
for. 1,2,4,8,16,32,64 |
|
|
returns |
(ret, Width, Height) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
|
|
Width |
Image width. |
|
|
Height |
Image height |
Returns the image width and height
for the image specified.
|
ImgNum |
Image index number. |
|
|
PixIncr |
Pixel increment to retrieve size
for. 1,2,4,8,16,32,64 |
|
|
returns |
(ret, Width, Height) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
|
|
Width |
|
|
|
Height |
|
Clamp values to image size at a
give pixel increment
|
ImgNum |
Image index number. |
|
|
PixIncr |
Pixel increment 1,2,4,8,16,32,64 |
|
|
StartX |
Start X of window to clamp |
|
|
StartY |
Start Y of window to clamp |
|
|
Wdt |
Width of window to clamp |
|
|
Hgt |
Height of window to clamp |
|
|
returns |
(ret, StartX, StartY, Wdt, Hgt) |
|
|
|
ret |
0=Invalid image index number,
1=Clamped |
|
|
StartX |
New start X |
|
|
StartY |
New start Y |
|
|
Wdt |
New Width of window |
|
|
Hgt |
New Height of window |
Returns the image pixel size
|
ImgNum |
Image index number. |
|
|
returns |
(ret) |
|
|
|
ret |
Return pixel size. (ground) |
Returns the image filename of the
image specified.
|
ImgNum |
Image index number. |
|
|
returns |
(ret, FileName) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range. |
|
|
FileName |
Image file name. |
Returns image index number based
on file name
|
FileName |
Image file name. |
|
|
returns |
(ret, ImgNum) |
|
|
|
ret |
0 = OK -1 = Filename not found. |
|
|
ImgNum |
Return image index number |
Returns the current image offset
(if Origin has been changed)
|
ImgNum |
Image index number. If the image
number is out of range, 0.0, 0.0 is returned. |
|
|
returns |
(OfsX, OfsY) |
|
|
|
OfsX |
Offset X (ground) |
|
|
OfsY |
Offset Y (ground) |
Converts ground coordinate to
image coordinate.
|
ImgNum |
Image index number. |
|
|
gx |
Input ground coordinate X |
|
|
gy |
Input ground coordinate Y |
|
|
returns |
(ix, iy) |
|
|
|
ix |
Output image coordinate X |
|
|
iy |
Output image coordinate Y |
Converts ground coordinate to
image coordinate.
|
ImgNum |
Image index number. |
|
|
ix |
Input image coordinate X |
|
|
iy |
Input image coordinate Y |
|
|
returns |
(gx, gy) |
|
|
|
gx |
Output ground coordinate X |
|
|
gy |
Output ground coordinate Y |
|
ImgNum |
Image index number. |
|
|
Corner |
Corner to get: 1 - Lower left. 2
- Lower right. 3 - Upper right. 4 - Upper left. |
|
|
returns |
(ret, x, y) |
|
|
|
x |
Corner X |
|
|
y |
Corner Y |
Returns the image center
coordinate in ground units.
|
ImgNum |
Image index number |
|
|
returns |
(ret, x, y) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range. |
|
|
x |
Corner X |
|
|
y |
Corner Y |
Reads a window of image data based
on window parameters sent.
|
ImgNum |
Image index number. |
|
|
StartX |
Start pixel column. |
|
|
StartY |
Start pixel row. |
|
|
SizeX |
Number of columns to read. |
|
|
SizeY |
Number or rows to read. |
|
|
PixIncr |
Pixel increment used for
downsampling (2=read every other pixel) |
|
|
returns |
(ret, ImageMemory) |
|
|
|
ret |
0 = O -1 = Image index number
out of range |
|
|
ImageMemory |
List of pixel rows and values.
List is in [rows][cols] format. Each item in rows is 1 or 3 item list of
pixel values. |
Sets the world file transformation
parameters and optionally writes the file.
|
ImgNum |
Image index number. |
|
|
ScaleX |
X direction pixel size (ground) |
|
|
ScaleY |
Y direction pixel size (ground,
sign will be reversed, send as positive) |
|
|
RotX |
X rotation |
|
|
RotY |
Y rotation |
|
|
UpLeftX |
Upper left coordinate (ground) |
|
|
UpLeftY |
Upper left coordinate (ground) |
|
|
WriteFile |
0=Don't write file, 1=Write file |
|
|
returns |
(ret) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
Get the current world file
transformation parameters.
|
ImgNum |
Image index number. |
|
|
returns |
(ret, ScaleX, ScaleY, RotX,
RotY, UpLeftX, UpLeftY) |
|
|
|
ret |
0 = OK -1 = ImgNum invalid |
|
|
ScaleX |
X direction pixel size (ground) |
|
|
ScaleY |
Y direction pixel size (ground) |
|
|
RotX |
X rotation |
|
|
RotY |
Y rotation |
|
|
UpLeftX |
Upper left coordinate (ground) |
|
|
UpLeftY |
Upper left coordinate (ground) |
Get the current world file
rotation
|
ImgNum |
Image index number. |
|
|
returns |
(ret) |
|
|
|
ret |
World file rotation |
Shifts the world file transformation
parameters and optionally writes file.
|
ImgNum |
Image index number. |
|
|
ShiftX |
X direction shift value (ground) |
|
|
ShiftY |
Y direction shift value (ground) |
|
|
WriteFile |
0=Don't write file, 1=Write file |
|
|
returns |
(ret) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
Gets current brightness and
contrast of image
|
ImgNum |
Image index number to get |
|
|
returns |
(ret, Bright, Contrast) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
|
|
Bright |
Brightness index 0-100 (50=None) |
|
|
Contrast |
Contrast index 0-100 (50=None) |
Sets current brightness and
contrast of image
|
Bright |
Brightness index 0-100 (50=None,
-1=No Change) |
|
|
Contrast |
Contrast index 0-100 (50=None,
-1=No Change) |
|
|
ImgNum |
Image index number to adjust
(-1=All=default) |
|
|
returns |
(ret) |
|
|
|
ret |
0 = OK -1 = Image index number
out of range |
Set color map to be applied
whenever pixels are read from the image.
|
ImgNum |
Image index number this applies
to or -1 for all images |
|
ColorMap |
3x256 list of values for
colormap |
|
Type |
Color map type. User defined
value. Should start at 1000 or greater to avoid conflict with Vr types. for
each type added, there can only be one colormap. If a colormap with the same
type already exists, it will be replaced. |
Add color map to be applied
whenever pixels are read from the image.
|
ImgNum |
Image index number this applies
to or -1 for all images |
|
Type |
Color map type. |
Set default color map to be
applied whenever pixels are read from the image.
|
ImgNum |
Image index number this applies
to or -1 for all images |
|
|
ColorMap |
| |