Title: Methoden und Tools der IRBildgenerierung Gliederung
1Img Inside Out
Paul Obermeier
obermeier_at_poSoft.de paul.obermeier_at_lfk.eads.net
Third European Tcl/Tk User Meeting. Munich, June
2002
2Img Inside Out Content
Img is a Tcl extension to support various image
file formats for use with the Tk photo image.
Besides reading/writing from/to files, it also
supports image data in Tcl variables (both in
binary and uuencoded form).
Img from the outside
- Example applications from EADS/LFK. - Example
applications from poSoft.
Img from the inside
- Current, planned and future state of Img. -
Utilities and test programs. - Summary List of
supported formats.
3Tk and Img based applications at EADS/LFK
The system simulation department of EADS/LFK uses
Tcl/Tk and Img for pre- and postprocessing of
complex simulations. MDS (Mathematical Digital
Simulation) Simulate all relevant components of
a missile and its environment in software. Main
design issues Flexibility and portability (long
project durations).
Configuration Preprocessing
Simulation (Batch processing)
Visualization Postprocessing
Tk based GUIs for safe editing of configuration
files. Tk based GUIs for configuration and
execution of physical models (Example 1).
Pure batch programs written in C, C or Ada
reading input files and generating output files.
Tk/Img based GUIs for visualization of rendered
image sequences (Example 2) and postprocessing of
generated simulation data (Example 3).
4Example 1 GUIs for physical models.
Left Graphical frontend for MODTRAN, an
atmospheric radiative transfer model. Right
Graphical frontend for Thermos, a LFK developed
thermal model.
5Example 2 OsmVis
Replay of multiple infrared image sequences
overlayed with vector graphics. Images are read
from files in Sun Raster format.
6Example 3 MdsViewer
2D and 3D visualization of simulation results
with Tk/Img and Performer. Grid of height values
(DTED format) interpreted as a photo image.
7Tk and Img based applications from poSoft
www.poSoft.de is my private homepage Paul
Obermeiers Portable Software. Home of poTools,
a set of portable Tcl/Tk applications poDiff
Portable tool to recursively compare the
contents of two directories. poBitmap
Portable tool to view and manipulate X-Window
bitmaps. poImgdiff Portable tool to compare
two images (Example 4). poImgview Portable tool
to view and manipulate images (Example 5).
8Example 4 poImgdiff
Portable image comparison tool. Images are
placed side by side for visual comparison. Generat
ion of difference images and histograms.
9Example 5 poImgview
Portable image viewer. Includes image browser and
batch format conversion.
10State of Img Current
The Img extension was developed and maintained in
major parts by Jan Nijtmans. Latest version of
Img (1.2.4) was uploaded to SourceForge by A.
Kupries in May 2002. - Project page
http//sourceforge.net/projects/tkimg - Project
maintainers Jeff Hobbs, Andreas Kupries, Jan
Nijtmans. - Additional developers Paul
Obermeier. - Supported image formats BMP
Windows bitmap GIF Graphics
interchange format JPEG JPEG PNG
Portable network graphics format POSTSCRIPT
Postscript (needs ghostscript) TIFF
Tagged image file format WINDOW Put the
content of a window into a photo XBM
X-Windows bitmap XPM X-Windows pixmap
11State of Img Planned
Most of the code for the following planned
actions is already implemented in an alpha
version available at www.poSoft.de. It will be
added to SourceForge in two steps Step1 (June
2002) Enhancements and bug fixes of existing
formats - Add support routines for reading image
data in small pieces (RLE). - Add reading of
run-length encoded Windows bitmaps. - Speed
improvements and bugfixes for XPM format. - Add
PPM format to Img to enable -data option. -
Various bug fixes. Step2 (July 2002) Addition
of new image formats DTED Digital Terrain
Elevation Data PCX Paintbrushs PCX format RAW
Raw image data (matrix of floats) SGI Silicon
Graphics native format SUN Sun Raster
format TGA Truevisions Targa format
Img 1.3
12State of Img Future
The following actions are taken from my personal
wish list. Implementation will need the help of
the community. Please feel free to contribute in
any form. Near future actions - Remove usage of
Tk-internal structures to enable stubs. - Update
versions of external libraries libpng, libjpeg,
libtiff, libz. - Improve existing format handlers
for full compliance. - Additional image formats
Windows icons, PICT, WMF, Photoshop, ??? Issues
influencing Img and Tk - Better transparency
support. - Improved image manipulation Scaling,
rotation, filter, etc. (see extension poImg at
www.poSoft.de)
13Img utility poImgtype
Tk package for selection of image formats and
corresponding options.
Available functions OpenWin Open
selection window. GetFmtList Get list of image
formats. GetExtList Get list of file
extensions. GetOptByExt Get option string by
file extension. GetOptByFmt Get option string
by format identifier. LoadFromFile Load settings
from file. SaveToFile Save settings to file.
14Img utility Test programs
These tests try to store the content of a canvas
window in image files using all file formats and
all methods (file, binary and uuencoded string)
available in the Img package. After writing we
try to read the image back into a photo by using
the auto-detect mechanism of Img. If that fails,
we use the "-format" option.
Test 1 Using full images Test 2 Using -from
option Test 3 Using -to option Test 4 Using all
sizes from 1x1 till 4x4 pixels
15Summary List of supported formats
BMP Windows bitmap DTED Digital
Terrain Elevation Data GIF Graphics
interchange format JPEG JPEG PCX
Paintbrushs PCX format PNG Portable
network graphics format POSTSCRIPT Postscript
(Read-Only) RAW Raw image data (matrix of
floats) SGI Silicon Graphics native
format SUN Sun Raster format TIFF
Tagged image file format TGA Truevisions
Targa format WINDOW Put the content of a
window into a photo XBM X-Windows
bitmap XPM X-Windows pixmap
16Happy Tcling
E-Mail at home obermeier_at_poSoft.de E-Mail at
work paul.obermeier_at_lfk.eads.net My homepage
http//www.poSoft.de Jans homepage
http//purl.oclc.org/net/nijtmans/ Img project
page http//sourceforge.net/projects/tkimg