Copyright © 2009, Wojciech Golebiowski (vugie)
All rights reserved.
Author: Wojciech Golebiowski (w_golebiowski (at) tlen.pl)
Name: BitMan (Bitmap Manipulation Library)
Type: framework, library
LabVIEW version: 8.2.1
Bitman library is designed for image processing based on a specially-defined structure to store the image, and a system of filters. It is not only a set of tools performing specific operations on images, but also a framework to help create your own image processing functions with a mechanism called "dynamic filters".
Library contains few basic built-in filters. Their design concentrates on the versatility, ease of use, and the clearance of the code. This results in a decrease of efficiency and consequently, processing of large images using standard filters may be slow. But this is not a limitation of the framework and it is possible to create user filters, which may - as a more specialized - operate much more efficiently. Built-in filters are good for processing of relatively small images and can be used to support programming user interfaces, operations on the icons, creating graphical documents, etc.
Library was written using object-oriented programming techniques (LVOOP).
Libraries can be used after unpacking it anywhere on disk. Access to all of the features is possible then by opening the library file "BitMan Lib.lvlib". However, it is most convenient to copy entire BitMan directory to the directory \user.lib. After the restart of LabVIEW on a pallet, in the User Libraries, sub-palette "BitMan" will appear.
A description of all VIs from palette is available in the file "docs\BitMan docs.html". Descriptions are also included (for all functions) in the Documentation section of the VI Properties dialog, as well as for more important front panel controls and, as such, are available through the LabVIEW context help.
Examples of applications can be found in the directory "examples" (examples of the use of the library itself) and the directory "examples\Dynamic Filters" (examples of the creation of filters). Examples along with descriptions in the diagrams are an integral part of the documentation.
The most important class it the Bitmap class. It contains structure for storing an image (the description of the structure may be found in documentation under Bitmap type.ctl) and the basic access methods. The main assumption of this structure is to store the image in three-dimensional U8 array, where subsequent dimensions mean respectively height (y coordinate), width (x) and subsequent color channel. Number of channels in the image depends on the bit depth, additionally you can define any number of user channels. It is possible to store pictures 1 -, 4 -, 8 -, 24 - and 32-bit, while the 32-bit means here CMYK color model, rather than - as is sometimes used - RGB images with transparency . Transparency (the so-called alpha channel) is stored in a separate field of the structure. Support for CMYK images is not fully implemented yet.
The processing of images is done by the use of system of filters implemented in General Filter class. This class stores a reference to strictly typed VI processing an image and its runtime parameters. The filter is launched with Filter Run method, which uses the dynamic call mechanism. Filter runtime parameters are stored in the object as a variant variable for unified method for passing them.
Users can create their own filters in two ways: by using methods of Dynamic Filter class and filter template or by creating a new class inheriting from General Filter class. It is also possible to create a function-specific interfaces for the use of filters as the normal LV function. Inheriting and transparent interface is the way buit-in filters work, so they are also a specific example of use of the library.
Template to create your own filters may be found in "typedefs".
Using of dynamic filters is supported Library Filter class designed for managing filters. It makes use of the functional global mechanism for storing and providing access to pre-loaded filters with assigned names. It can call the filters by using short names anywhere in the code, without a burdensome wiring of filter objects.
Another supporting class is Bitmap With Filters class, inheriting from the Bitmap class and extending its functionality with a possibility of using a sequence of filters.
More detailed descriptions of individual functions and applications can be found in the above mentioned documentation and examples.
Initial release of the code.
Packaged version with small bugfix