Appendix B. What is New in Version 3.0

This appendix describes the differences between versions 2.5 and 3.0 of the ImageVision Library. If you are new to ImageVision, you should skip this appendix. The changes mentioned in this appendix are integrated into the remainder of this manual.

This appendix is split into the following sections:

Overview of Changes in 3.0

The major new features in IL 3.0 are:

  • Support for OpenGL with transparent use of X rendering when OpenGL is not available.

  • Support for 64-bit address space.

  • Support for a configurable error reporting mechanism.

  • Support for a generalized callback mechanism.

The major changes to existing features are:

  • IRIS GL rendering is no longer supported.

  • The Fortran API. is no longer supported. It is still possible, however, to use the C API from Fortran.

  • File format support is now provided by the Image Format Library (IFL).

  • Some base functions of IL were moved to IFL with corresponding name changes.

  • Hardware acceleration is now user extensible.

  • Scalability to larger numbers of processors has been improved.

  • Asynchronous operations are now supported.

  • Long operations can be aborted.

  • Handling of image warping has been generalized.

The following sections provide more detail on all of the changes and additions made in IL 3.0.

Understanding the New Features

This section describes the new features in IL version 3.0.

Support for OpenGL and Hardware Acceleration

IL 3.0 is built on top of OpenGL instead of IRIS GL. Applications that were using IRIS GL must be ported to OpenGL because the two graphics libraries are not compatible. Moving to OpenGL also means that IL 3.0 performs optimally on new graphics hardware that has a native OpenGL implementation. On older platforms, such as RealityEngine, there will be some degradation in performance.

IL 3.0 maintains its own, internal OpenGL context which minimizes interactions between hardware-accelerated operations and user rendering to the same window.

ilGLDisplayImg, ilGLViewer, and ilGLXConfig are gone. Programs that used those classes must be ported to OpenGL and the ilXWindowImg and ilViewer classes.

IL 3.0 automatically manages a hardware rendering thread. ilHwIsSGI, ilHwThreadEnable, ilHwThreadSuspend, ilHwThreadResume are also gone.

64-bit Address Space Support

size_t, defined in /usr/include/sys/types.h, is used in IL 3.0 to specify the size of an object in memory. Depending on the maximum size that an object in the virtual memory, size_t can be either unsigned 32 bit or 64 bit. The return types of all functions returning the size of an object used to be int; now they return size_t.

Understanding New Classes

The following classes have been added to IL.

ilAffineWarp

ilAffineWarp is a subclass of ilWarp that extracts the first degree polynomial coordinate transformations that were formally embedded in ilPolyWarpImg. ilRotZoomImg uses this warp class to represent its transformations.

ilCallback

ilCallback is a new base class with two derived classes: ilFunctionCallback and ilMethodCallback. The derived classes provide a standard way to encode new function callbacks. The external interface uses derived classes from ilFunctionCallback and ilMethodCallback.

ilFunctionCallback creates a callback to a function that takes an argument, userArg. This argument is supplied when the callback is created and a second argument, callerArg, is passed from the callsite of the callback (when doit() is called).

ilMethodCallback is similar to ilFunctionCallback. You use both to create a callback to a method on an object of a specified class.

iflColormap

iflColormap is derived from iflLut. The only difference between the two is that iflColormap cannot have a one-to-one mapping onto the domain of the LUT. You use iflColormap to represent the colormap for image files that have an iflRGBPalette color model. All methods getting or setting colormaps now pass an iflColormap object instead of an ilLut.

ilCompoundImg

ilCompoundImg is an abstract class that can be used to manage an IL subchain as if it were a single object. This can be useful for encapsulating an IL subchain used repeatedly in an application. You can use IL to create variable subchains since the parents and children of ilCompoundImg are attached to ilCompoundImg itself rather than internal subchains. For example, an ilCompoundImg could encapsulate two subchains which share common output processing but process input differently.

ilELTImg

ilELTImg, together with ilDisplay, ilView, and ilStereoView, provide functions needed by Electronic Light Table (ELT) applications. ELT applications provide real time manipulation of images, compressed or not. ilELTImg is derived from ilCompoundImg and manages an image chain consisting of dewarp, convolution, table look-up and histogram. Image manipulation, such as roaming and wiping as well as multi-image display and stereo display, is supported in ilDisplay.

ilFPolarImg

ilFPolarImg is a new base class for ilFMagImg and ilFPhaseImg that operate on fourier domain images.

ilFPolyadicImg

ilFPolyadicImg is a new base class for ilFMonadicImg and ilFDyadicImg that work on fourier domain images. ilFMonadicImg and ilFDyadicImg are now derived from ilFPolyadicImg as special cases.

ilFrameBufferImg

ilFrameBufferImg, derived from ilImage, is the basis for all IL access to frame buffer memory. IL maintains internal display and GL contexts to isolate its rendering from the user's code.

ilMath

In ilMath.h, some useful mathematical templates for integer types are defined, for example, ilMod, ilDiv, ilDivUp, ilRoundUp, and ilRoundDown.

ilPolyWarp

ilPolyWarp is a subclass of ilWarp that extracts the seventh-degree polynomial coordinate transformations that were formally embedded in ilPolyWarpImg.

ilPolyadicImg

ilPolyadicImg, derived from ilOpImg, is the base class for N-input operators. Many formerly ilDyadicImg-derived operators, for example, ilAddImg, ilAndImg, ilBlendImg, ilMaxImg, ilMinImg, ilMultiplyImg, ilOrImg, and ilXorImg, now allow multiple inputs. ilDyadicImg is now derived from ilPolyadicImg as a special case.

ilTiePointList

ilTiePointList manages a set of tie points used by ilTiePointImg. It provides methods to add, remove, and locate tie points.

ilTimeoutTimer

ilTimeoutTimer provides a simple and efficient means of implementing a timeout period for a polling loop. The timer automatically adapts its internal time checking to avoid excessive reads of the hardware timer. Because of this optimization, the timeout period is within 10% of the actual period.

ilTimer

ilTimer provides an interface to the high-resolution interval timer. On most SGI machines this has a resolution of 1 usec or better.

ilWarp

ilWarp provides an abstract class to one-, two-, and three- dimensional coordinate system warps from, respectively, (u), (u, v), and (u, v, w) space to (x), (x, y), and (x, y, z) space. The subclasses ilPolyWarp, ilAffineWarp, and ilPerspWarp implement particular instances of the ilWarp abstraction. The ilWarp class hierarchy enables more convenient control of ilWarpImg.

Understanding the Changes to the Existing Features

This section explains how IL version 2.5 features have changed.

Multi-threading Architecture Changes

The MP architecture of IL has been completely redesigned for IL 3.0. This redesign enables

  • better scalability to larger numbers of processors

  • better integration of a dedicated rendering thread for improved graphics performance

  • long operations to be aborted

The old ilDispatcher and ilRequest classes are replaced by the new ilMpManager and ilMpRequest classes. The ilMpSetMaxProcs parameter, spare, which specified the number of spare I/O threads is gone. IL 3.0 now uses a dedicated read thread.

Asynchronous Operations

All of the tile access methods, including getTile3D, setTile3D, copyTile, now have asynchrounous versions, for example, qGetTile3D, qSetTile3D, qCopyTile, respectively, that can access a tile without waiting for an operation to complete.

The caller can add a queued operation as a dependent operation on some other ilMpManager or ilMpRequest. In this way, image operators handle input data tile requests when processing a request to compute a page.

In addition, queued operations can return an ilMpManager object. This process allows a number of synchronization options:

  • you can add a completion callback to the operation

  • you can explictly wait for the operation to complete at a later time

  • an operation can be aborted before it completes

Deriving Image Operators

To support asynchronous operations and aborting, the getPage() virtual function in ilOpImg has been replaced by three new virtual functions that break the processing of a page into three phases: prepareRequest(), executeRequest() and finishRequest().

In the prepare phase, an operator allocates input buffers and fills them with image data. In the execute phase, the operator processes the image. In the finish phase, any allocated buffers or locked pages are freed. The finish phase is separate from the execute phase to allow aborted requests that have been prepared, but not executed, to skip the processing phase and free allocated resources.

These changes are only visible to operators derived directly from ilOpImg. Operators derived from more typical classes, such as ilMonadicImg or ilSpatialImg, still use the calcPage() API.

Image Format library

The image file format functionality has been separated into a library called Image Format Library (IFL). This library takes care of all I/O image processing. IL uses IFL to perform image I/O. IFL applications do not have to use IL, however, IFL also simplifies and standardizes the process of adding support for new image file formats.

The external interface to the IFL is encapsulated in two classes: iflFile and iflFormat. Note that IL users will normally continue to use ilFileImg directly; not the IFL API. Refer to the IFL man pages and release notes for more information on using IFL directly.

File formats

New image file formats such as PPM (portable pixmap file format) and PNG (new public domain replacement for GIF) are supported in IFL.

JPEG compression support in TIFF files had been added as has the ability to decompress JFIF images at reduced resolution and increased speed.

IFL also supports GIF file format writing, which was not supported in IL 2.5.

Renamed Types Now Defined in IFL

File format types, tile descriptors, list objects, vectors, and other generic types, such as ilBitArray, ilColor, ilConfig, ilCoord, ilDataSize, ilDictionary, ilHashTable, ilList, ilLut, ilMinMax, ilPixel, ilSize, ilSpace, ilTile, and ilTypes, shared by both IL and IFL are now in IFL. Consequently, the class name prefixes have changed from “il” to “ifl”.

A complete list of the name changes can be found in “Automatic Class Name Conversion”.

Changes to the Display Facility

The biggest change to the IL display facility is that OpenGL has replaced IrisGL. IL no longer supports GL windows or GL events. Additional changes to the display facility include the addition of callbacks, queued paint operations, and new border styles.

All support for GL windows and GL event handling has been removed. Now only support for X windows and X event handling is provided. Since X rendering and OpenGL rendering can be mixed in the same X window, IL no longer has a render mode. If the visual supports OpenGL, rendering is done with OpenGL. Otherwise, X is used to render the images.

ilDisplay, ilViewer (and ilXWindowImg) can now create a window for the user with an appropriate visual for the server they are connected to. ilViewer has a new eventLoop() method that runs the event loop to make coding a simple IL application as easy as possible. Callbacks have been added to ilDisplay and to ilView. Each has a post-render callback and ilView also has a border callback. Paint operations can now be queued which is useful for enhancing GUI response in applications. To turn on this feature, call ilDisplay::enableQueueing(True).

All methods to get and set color for backgrounds, errors, and borders now take a float rgb triplet (normalized to a range of 0-1) instead of ilPixel.

ilDisplayImg, ilGLDisplayImg, and ilXDisplayImg have been replaced by ilFrameBufferImg and ilXWindowImg. Users no longer need to tell IL to use X rendering since both OpenGL and X do their rendering to X drawables. Instead, IL determines if the visual supports OpenGL; if it does, IL uses it to display a window.

Error handling

ilError provides a standard interface to handle error processing, notification, and recovery. In the new interface, unexpected or exceptional conditions are classified according to severity:

  • MM_HALT

  • MM_ERROR

  • MM_WARNING

  • MM_INFO

These severity levels are defined in pfmt.h; MM_HALT is the most severe, MM_INFO is the lease severe.

When an error condition is encountered, the default behavior, defined in ilNaiveErrorHandler, is to print a message to stderr. If the severity is MM_ERROR or MM_HALT, IL exits the program.

IL provides three error handling functions:

ilNaiveErrorHandler

Prints message to stderr and aborts the program if the severity is MM_ERROR or MM_HALT.

ilRobustErrorHandler

Prints message to stderr and aborts if severity is MM_HALT.

ilSilentErrorHandler

Prints a message to stderr and aborts if severity is MM_HALT. Otherwise, remains silent and continue execution.

The behavior of the error handling functions can be overridden by using ilSetErrorHandler to supply a user's error handler. If such a handler is not supplied, one of the standard error handling functions is selected according to the environment variable, for example, if IL_SILENT is set, ilSilentErrorHandler is selected if IL_ROBUST is set, ilRobustErrorHandler is selected, otherwise, ilNaiveErrorHandler is selected by default.

The current global error handling function can be queried using ilGetErrorHandler.

IL single-threads calls to error handlers. If an error happens in a thread, the thread blocks until no other errors are being handled in other threads. One benefit of the blocking is that an error handler can send a message to an error stream in multiple fprintf() statements without fear that the pieces will be shuffled together with messages from another error handler running in a different thread.

As in IL 2.X, the type ilStatus is overloaded to represent both a function return value and an object's state. However, in IL 3.0, rather than being an enumerated type with only a few dozen possible values, ilStatus is now a 32-bit quantity composed of 3 components:

unsigned int mainStatus:12 -- il status code
unsigned int subDomain:4 -- domain of subStatus
unsigned int subStatus:16 -- subdomain status code

mainStatus encodes a value of enumerated type ilMainStatus, similar to the 2.51 ilStatus enumerated type. subStatus encodes an elaboration of the main status from another domain. In order to determine what subStatus means, one must examine subdomain to see what subStatus contains, for example, UNIX error numbers's or iflStatus values.

The status code 0, ilOKAY, is reserved. Callers can check the ilStatus value without worrying about specific return values.

ilError.h contains the definition of ilStatus (32-bit unsigned int) and the enumerated types ilMainStatus and ilSubDomain; they represent the possible values of the mainstatus and subStatus fields, respectively. ilError.h also contains inline functions and macros to manipulate the following composite ilStatus values:

ilStatusEncode,
ilGetMainStatus,
ilGetSubDomain,
ilGetSubStatus,
ilStatusToString, and 
ilStatusFromIflStatus.

Polynomial Coordinate Structures

Most of the polynomial coordinate structures defined in ilPolyDef.h have been removed. Specifically, declarations for polynomials of degree 2 through 6 no longer exist. In addition, the cubic polynomial evaluation routines in ilVector.h (ilVG3Poly and ilVG3Poly2D) no longer exist.

The coefficient structures for first- and seventh-degree polynomial structures, defined in ilPolyDef.h, have been renamed, as shown in Table B-1.

Table B-1. New Names for Polynomial Structures

Old Name

New Name

ilCoeff1_2d

ilAffine2D

ilCoeff7

ilPolyCoeff1D

ilCoeff7_2d

ilPolyCoeff2D

ilCoeff_1d

ilPoly1D

ilCoeff_2d

ilPoly2D


Run-time Object-Type Query Macros

The declaration and implementation for run-time object-type inquiries are generalized to support any class, not just classes derived from ilLink, as the names in Table B-2 suggest.

Table B-2. Run-time Object Inquiries

Old Name

New Name

ilDeclareDerivedClass

ilClassListDeclare

ilImplementDerivedClass

ilClassListImplementBase (or ilClassListImplementDerived)

At run time, a statically-created class inheritance chain supports run-time object type inquiries. To acquire this capability, put the ilClassListDeclare macro in the public section of a class declaration derived from a base class and the ilClassListImplementBase (for all base classes) or ilClassListImplementDerived (for all derived classes) macro in the implementation file. In addition, the methods declared in ilClassListDeclare are of const type. Therefore, it is possible to call these methods on a const object.

Changes to Existing Classes

The following miscellaneous changes have been made to existing IL classes:

ilCacheImg

In ilCacheImg, all callback-related functionality has been changed to use the standard ilCallback interface. Specifically, the following callback-related functionality has been replaced: setPagingCallback, setPagingCallbackDefaultEnabled, getPagingCallback, getPagingCallbackArg, getPagingCallbackDefaultEnabled, enablePagingCallback, isPagingCallbackEnabled, and listResident. These callback-related routines are replaced by addPagingCallback, removePagingCallback, hasPagingCallbacks, and doPagingCallbacks. Either ilPagingMethodCallback or ilPagingFunctionCallback (newly defined) can be used with ilCacheImg::addPagingCallback().

ilClassId

ilClassId has changed to a const pointer to the ilClassList structure. ilConfig is now a derived class of iflConfig instead of a base class. The color model parameter in the constructor is now gone.

ilDilateImg

In ilDilateImg, the biasValue parameter in the constructor is gone.

ilDisplay

ilDisplay uses an overloaded constructor to specify visual attributes and to automatically create an X window. getStart() and setStart() have been renamed to getMouse() and setMouse() because their values are updated by the current mouse position after one or more display operations.

ilDisplay::getVisibleArea() and ilDisplay::setVisibleArea() were added to clip painting for scrolled window support.

ilDisplay::mapXY() was added to handle from and to orientations. Note that ilCoordSpace has been renamed to iflOrientation.

enableFrontRedraw() and isFrontRedrawEnabled() were added to allow redraws to the front buffer in double buffer mode. This improves an application's perceived responsiveness.

setMode() and clrMode() were added to control the display mode used for adding new ilViews. New ilViews inherit dispMode() which makes it easier to defer painting while adding many new views.

Post-render callbacks were added which are called after all views have been rendered. There are three callbacks: prepare, render, and finish. The prepare and finish callbacks are called by an IL compute thread. The render callback is called by the IL render thread to maximize rendering performance. The prepare and finish callbacks can be NULL.

You can set and query a roam rate limit using setRoamLimit() and getRoamLimit(). You use the roam limit to smooth the roam motion. The limit sets the displacement, in pixels, between consecutively-rendered frames. Since the displacement is constant, regardless of the motion of the mouse, the roam speed is constant. For example, if the roam limit is four pixels, consecutively-rendered frames will be separated by four pixels regardless of how much or little the mouse moves.

ilDisplay no longer supports autoSwap. Instead, pass ilNoSwap in the mode argument to disable swapping.

ilDisplay::getScreenNum() was removed.

ilErodeImg

In ilErodeImg, the biasVal parameter in the constructor is gone.

ilFDyadicImg

cmplxVectorCalc() now has an extra argument to indicate whether the vector includes a dc value. getPage() is gone and its functionality is replaced by prepareRequest(), executeRequest(), and finishRequest().

ilFFTOp

ilFFTOp is no longer a public class. Forward and inverse transform, ilRfftf and ilRffti, can be done only using ilRFFTfImg and ilRFFTiImg.

ilFFiltImg

getPage() has been replaced by prepareRequest(), executeRequest(), and finishRequest().

ilFMonadicImg

getPage() has been replaced by prepareRequest(), executeRequest(), and finishRequest().

ilFalseColorImg

In ilFalseColorImg, a NULL constructor was added.

ilFileImg

ilFileImg was the abstract base class for various file format subclasses, for example, ilJFIFImg, ilPCDImg, ilPCDOImg, ilFITImg, ilGIFImg, ilSGIImg, and ilTIFFImg. Those subclasses are now gone.

ilGenericImgFile and ilFileImg have been replaced by ilFileImg. ilFileImg provides a standard interface for opening or creating image files of all format types. All file format-specific implementations are hidden inside the IFL.

There are major changes in ilFileImg.

ilFsDitherer

ilFsDitherer generates an optimal colormap for a full-color image and performs a high quality dithering to produce a color index image. The algorithm that generates this colormap is based on Heckbert's median cut algorithm. The function takes a pointer to the source image and to the number of colors you want in the color-index image. The function returns an optimal colormap based on the distribution of pixel values in the source image. The input image can be dithered using the Floyd-Steinberg algorithm. IL now maintains a global dithering mode that can be set and queried using two new, utility methods: ilSetDither() and ilGetDither(). So, when creating a color index image, one can either set the dithering to ilNoDither for no dithering, ilFSDither for Floyd-Steinberg dithering, or ilSGIDither for standard SGI dithering.

These functions and the ilDither enum are defined in ilConfigure.h.

ilGBlurImg

In ilGBlurImg, getBlur() was added and setBlurKernelSize() was removed.

lHistLutImg

In lHistLutImg, getImgStat() and getRoi() were added.

ilHistScaleImg

In ilHistScaleImg, getImgStat() and getRoi() were added.

ilImage

In ilImage, the following methods were added: hwAccelerate(), isAccelerated(), copy(), q[Get/Set]SubTile3D(), qCopyTileCfg(), qDrawTile(), qFillTile[3D/RGB](), q[Get/Set]Tile3D(), qLockPageSet(), drawTile(), [alloc/get/free]FillData(), fillTileRGB(), getDimensions(), getCopyConverter(), getHwOp(), getHwPassTable(), getLockTileSet(), getPageOrigin(), hwDefine(), isIntegral(), [get/set]MaxColormapLevels(), and [is/set]Writable().

The methods map[To/From]Input() replace the methods eval[XY/UV]().

The new methods accept 3D arguments which enables tracking of 3D coordinate transformations through a chain. Numerous overloaded versions of these methods, including the old 2D versions, are also provided.

Methods with a different argument or return type, for example, clipTile(), take a new parameter of type iflTile3Dint which embodies offsets and dimensions.

getColormap() returns cmap through a return instead of a reference parameter. getFill() returns fillValue through a return instead of a reference parameter.

The following methods are obsolete: [get/set]CacheSize(), [get/set]Cache[Window/WindowCopy](), copyConverted(), isDisplayImg(), needColorConv(), operator<<(), seekTile[/3D](), and eval[XY/UV].

map[To/From]Source() now supports 3D coordinate transformations. Numerous overloaded versions of this method, including the 2D one, are also provided.

[map/isMirror]Space() has been replaced by [map/isMirror]Orientation().

minValue() and maxValue() changed from ilPixel to scalar double. [get/set][Min/Max]Value no longer have the channel parameter which means that minimum and maximum values are no longer maintained separately for each channel.

getPageSize() now uses a return of type size_t instead of int.

getPageSize() returns nx and ny through reference parameters.

copyTile[_/3D/Cfg]() methods no longer have the fromOther parameter. Operations are now always from the “other" image to "this" image.

getStrides3D() is replaced by getStrides().

setPageSize() is overloaded to allow only x and y page sizes to be set (and individual flags added to reflect this). setPageSizeZ() and setPageSizeC() were added.

[get/set]SubTile3D(), copyTileCfg(), fillTile3D(), lockTile3D(), and lockPageSet() are no longer virtuals.

lockPageSet() takes a new parameter, perPageCb.

hwGetPass() replaces hwEval().d

getColorImg() no longer has the optional parameter, img.

ilImgStat

In ilImgStat, the isAccelerated() method was added.

ilIndexableList

ilIndexableList is now a stand-alone class instead of a derived class from ilList. The new methods, get[Next/Prev](), were added.

ilLink

In ilLink, all callback related methods have been simplified to use the standard ilCallback interface. Specifically, setResetCallback(), setResetCallbackDefaultEnabled(), getResetCallback(), getResetCallbackArg(), getResetCallbackDefaultEnabled(), enableResetCallback(), and isResetCallbackEnabled() have been replaced by addResetCallback(), removeResetCallback(), and hasResetCallbacks().

The following functions were removed: get[Depth/Child]() and [add/remove]Parent().

ilDumpChain is now the dumpChain() method. The mpLock() method does not take the parameter, wait, anymore. The default value for parameter, spins, has changed.

The runtime type query methods are now const.

iflLut

iflLut was formerly ilLut. iflLut now supports scale and bias on index which allows a LUT to have a different length than its domain, for example, a LUT can have floating point input values ranging from 0-1 and have 256 entries. [get/set]Val() now takes an index as a double. A new constructor takes LUT length. You can now use getDomainStep() to access sequential LUT entries.

ilLutImg

getLookUpTable() now returns a pointer to the LUT through a function return instead of a reference parameter.

ilMemCacheImg

In ilMemCacheImg, the method getPageTime() was added which returns the average time to compute a page in the cache. The listResident() method now takes ilCallback as a parameter. lockPageSet() is now inherited from ilImage and has one extra parameter, perPageCb. [prepare/execute/finish]Request() methods now replace getPage().

ilFileImg, derived from ilMemCacheImg, is the only class still using getPage().

ilMemoryImg

In ilMemoryImg, setAutoSync() was removed as was the parameter, autoSyncEnable, in the constructor.

iflName

A new method was added to iflName: setID().

ilOpImg

In ilOpImg, checkDataType() was removed. getValidTypes() and getValidOrders() were added to query attribute values. The inherit() logic has been tuned to only re-inherit when inputs change.

ilPage

In ilPage, the null constructor was removed. [get/set]PID() was added that gets or sets the process id that computes this page.

ilPropSet

ilPropSet is a pure virtual class. Two subclasses of ilPropSet are provided, ilPropList and ilPropTable, which implement the abstract class as a linked list and as a hash table, respectively. ilPropList is now derived from iflList instead of ilIndexableList. Interface changes involved are: virtual functions, iterInit() and iterNext(), are removed from ilPropSet. To iterate through all of the elements in the set, use the methods provided in either iflList or iflHashTable.

ilSepConvImg

The ilSepConvImg constructor takes two new parameters, zKernzel and zsize, to support three dimensional kernel specifications. Two methods, setZkernel() and getZkernel(), were added that support three dimensional kernels. set[X/Y/Z]kernel() takes a new, optional parameter, kernSize.

ilSpatialImg

The constructor for ilSpatialImg no longer takes the parameters inputKernel and biasVal. It does, however, take a new parameter, inImg.

ilSpinLock

The atomicCreate() method takes one new optional parameter, name. The type of lockp in the same method is now declared differently. ilSpinLock objects now have names for monitoring (turned on with IL_MONITOR_LOCKS). New methods were added, including lock(), unlock(), cset(), getName(), monitoringLocks(), dumpLockStats(), and dumpLocks(). set() and unset() no longer return values.

ilSubImg

ilSubImg now has a NULL constructor. ilSubImg is now derived from ilOpImg so its result is cached in memory.

ilRoiImg

ilRoiImg is now derived from ilCombineImg so its result is cached in memory.

ilMergeImg

ilMergeImg is now derived from ilOpImg so its result is cached in memory.

ilTieWarpImg

ilTieWarpImg now uses the generic warp functionality of ilWarp that is built into ilWarpImg. It is possible to specify the warp using tie points, providing the underlying ilWarp class supports warp inference using tie points. Also, ilTieWarpImg uses ilTiePointList internally to maintain tie points.

The moveTiePoint() method is obsolete because it is no longer possible to reference a tie point by an index.

ilView

Three border callbacks and three post-render callbacks were added to ilView. The border callbacks draw the view borders; the post-render callbacks are called after the view has been rendered. The three border and post-render callbacks are defined as follows:

borderPrepareCB = prepare;
borderRenderCB = render;
borderFinishCB = finish;

postPrepareCB = prepare;
postRenderCB = render;
postFinishCB = finish;

The prepare and finish callbacks are called by an IL compute thread. The render callback is called by the IL render thread to maximize rendering performance. The border callbacks as well as the post-render callbacks can be enabled or disabled.


Note: The prepare and finish callbacks may be NULL.

Several new border styles were added, including BdrSolidLines, BdrDashedLines, BdrCornerHandles, and BdrMiddleHandles. Use setBorderStyle() to change the border style.

getDel() is now protected instead of private. Its return value is overloaded to XYZ or XY image position (now in floating point). getImgLoc(), a new method, returns the location of an image relative to its window.

ilViewer

Added ability to get/set X event window. This is used to support events that occur in overlay drawables.

ilWarpImg

ilWarpImg has been substantially rearchitected. The addrGen() method is obsolete, and there are no longer any pure virtuals in ilWarpImg. The warp is now specified by the setWarp() method. The current warp can be accessed using getWarp(). Numerous other internal changes were made to support the new MP methodology.

Backwards Compatibility with IL 2.5

IL 3.0 is not binary-compatible with earlier versions of the ImageVision Library (IL 2.5.1 and earlier). In addition, there are many source level differences. The largest difference is the wholesale movement of core typing from IL to the IFL subsystem. IFL performs all image reading and writing for IL. Consequently, all types dealing with image data types, pixel channel ordering, color models, and coordinate systems have been moved into IFL.

There is some IL 2.5 source-level compatibility available in IL 3.0, as described in “Automatic Class Name Conversion”. You can turn on this compatibility by compiling your source code with IL2_5_COMPAT defined. When IL2_5_COMPAT is defined the following source level incompatibilities remain:

  • In IL 2.5, the ilConfig class contained an ilColorModel (now iflColorModel) field named cm that is no longer present.

  • The old ilImage coordinate system member variable, space, has been renamed orientation.


    Note: IL2_5_COMPAT automatically changes the variable type from ilSpace to iflOrientation.


  • The types ilXYS*, ilXYZS*, and ilXYZCS* are now defined in terms of the corresponding IFL types which have constructors. As a result, using C style initialization is not legal for these types. Code that uses such initialization must be changed to use C++ style initialization, for example,

    ilXYSint xy[2] = {{ 1, 2 }, {3, 4}};
    

    becomes

    ilXYSint xy[2] = {ilXYSint(1, 2), ilXYSint(3, 4)};
    

  • The global functions ilSetDefaultFileFormat() and ilGetDefaultFileFormat() are not supported.

  • Transparent pixels are not supported by ilMedianCutCmapLut().

  • The ilList, ilListIter, and ilListIterRev classes (now the iflList, iflListIter, and iflListIterRev classes) have become template classes. You must use them with a template argument that declares what object types are linked into the lists, for example, iflList<ilImage>.

  • ilStatus is no longer an enum. It now returns a major error code, a subsystem ID, and a subsystem error code. As a result, any method which is declared to return an ilStatus value must now return ilStatusEncode(), for example,

    return ilStatusEncode(ilBADINPUT);
    


    Note: There is a setStatus(int) method which automatically encodes the int parameter and sets the ilImage object's status to that result.


Automatic Class Name Conversion

When you define DIL2_5_COMPAT in your program, the IL compiler automatically converts the 2.5 class names into their 3.0 equivalents, as shown in Table B-3.:

Table B-3. Class Name Conversions

Old Type Names

3.0 Type Names

ilBitArray

iflBitArray

ilColorModel

iflColorModel

 ilMinWhite

 iflNegative

 ilMinBlack

 iflLuminance

 ilRGB

 iflRGB

 ilRGBPalette

 iflRGBPalette

 ilRGBA

 iflRGBA

 ilHSV

 iflHSV

 ilCMY

 iflCMY

 ilCMYK

 iflCMYK

 ilBGR

 iflBGR

 ilABGR

liflABGR

 ilMultiSpectral

 iflMultiSpectral

 ilYCC

 iflYCC

ilCompress

iflCompression

ilNoCompression

iflNoCompression

ilSGIRLE

iflSGIRLE

ilCCITTFAX3

 iflCCITTFAX3

ilCCITTFAX4

iflCCITTFAX4

 ilLZW

iflLZW

ilPACKBITS

iflPACKBITS

ilConvIter

iflConvIter

ilConverter

iflConverter

ilCoordSpace

iflOrientation

ilUpperLeftOrigin

iflUpperLeftOrigin

ilUpperRightOrigin

iflUpperRightOrigin

ilLowerRightOrigin

iflLowerRightOrigin

ilLowerLeftOrigin

iflLowerLeftOrigin

ilLeftUpperOrigin

iflLeftUpperOrigin

ilRightUpperOrigin

iflRightUpperOrigin

ilRightLowerOrigin

iflRightLowerOrigin

ilLeftLowerOrigin

iflLeftLowerOrigin

ilDictionary

iflDictionary

ilFileFormat

iflDatabase

ilFillMode

iflFillMode

  ilFillAll

 iflFillAll

  ilFillSome

 iflFillSome

 ilFillNone

 iflFillNone

ilFlip

iflFlip

  ilNoFlip

 iflNoFlip

 ilXFlip

 iflXFlip

 ilYFlip

 iflYFlip

ilHashTable

iflHashTable

ilLinkItem

iflListItem

ilList

iflList

ilListItem

iflListItem

ilListIter

iflListIter

ilListIterRev

iflListIterRev

ilLut

iflColormap

ilName

iflName

ilOrder

iflOrder

 ilInterleaved

 iflInterleaved

 ilSequential

 iflSequential

 ilSeparate

 iflSeparate

ilPixel

iflPixel

ilSize

iflSize

ilStackBuffer

use ilStackAlloc()

ilTile

iflTile3Dint

ilTileFloat

iflTile3Dfloat

ilType

iflDataType

 ilBit

 iflBit

 ilUChar

 iflUChar

 ilChar

 iflChar

 ilUShort

 iflUShort

 ilShort

 iflShort

 ilULong

 iflULong

 ilLong

 iflLong

 ilFloat

 iflFloat

 ilDouble

 iflDouble

ilColorModelChans

iflColorModelChans

ilColorModelName

iflColorModelName

ilCompressionName

iflCompressionName

ilCoordSpaceName

iflOrientationName

ilCreateImgFile

use ilFileImg constructor

ilDataAnySign

iflDataAnySign

ilDataClosestType

iflDataClosestType

ilDataDemote

iflDataDemote

ilDataIsIntegral

iflDataIsIntegral

ilDataIsSigned

iflDataIsSigned

ilDataMax

iflDataMax

ilDataMin

iflDataMin

ilDataSize

iflDataSize

ilDataType

iflDataTypeFromRange

ilDataTypeName

iflDataTypeName

ilDataWantSigned

iflDataWantSigned

ilGetDefaultFileFormat

not supported

ilGetNextFileFormat

iflFormat::findNext()

ilGlobalDict

iflGlobalDict

ilGlobalName

iflGlobalName

ilMax

iflMax

ilMedianCutCmapLut

use ilFsDitherer class

ilMin

iflMin

ilOpenImgFile

use ilFileImg constructor

ilOrderName

iflOrderName

ilSGICmapLut

use iflSGIColormap class

ilSetDefaultFileFormat

not supported

ilSpcGetTransform

iflOrientationTransform

ilSpcIsLeft

iflOrientationIsLeft

ilSpcIsLow

iflOrientationIsLow

ilSpcIsMirrorSpace

iflOrientationIsMirror

ilSpcIsTrans

iflOrientationIsTrans

ilSpcMapFlipTrans

iflMapFlipTrans

ilSpcMapSize

iflMapSize

ilSpcMapSpace

iflMapOrientation

ilSpcMapTile

iflMapTile

ilSpcMapXY

iflMapXY

ilSpcMapXYSign

iflMapXYSign

ilXYS

iflXYS

ilXY

iflXY

ilXYZS

iflXYZS

ilXYZ

iflXYZ

ilXYZCS

iflXYZCS

ilXYZC

iflXYZC

ilDot

iflDot

ilCross

iflCross

ilXY[char, int, float, double]

iflXY[char, int, float, double]

ilXYZ[char, int, float, double]

iflXYZ[char, int, float, double]

ilXYZC[char, int, float, double]

iflXYZC[char, int, float, double]

ilXYS[char, int, float, double]

iflXYS[char, int, float, double]

ilXYZS[char, int, float, double]

iflXYZS[char, int, float, double]

ilXYZCS[char, int, float, double]

iflXYZCS[char, int, float, double]

ilMultiListIterRev

iflMultiListIterRe

ilMultiList

iflMultiList

ilGenericList

iflGenericList

ilTile[2D, 3D, Float,2Dint, 2Dfloat, 3Dint, 3Dfloat, 2Dint, 2Dfloat, 3Dint, 3Dfloat]

iflTile2D[2D, 3D, Float,2Dint, 2Dfloat, 3Dint, 3Dfloat, 2Dint, 2Dfloat, 3Dint, 3Dfloat]


New Derivations for Classes

Because of the introduction of many new classes, the inheritance between classes has changed, as shown in Table B-4.

Table B-4. New Class Hierarchies

Class

Old Base Class

New Base Class

ilAddImg

ilDyadicImg

ilPolyadicImg

ilAndImg

ilDyadicImg

ilPolyadicImg

ilBlendImg

ilDyadicImg

ilPolyadicImg

ilCombineImg

ilOpImg

ilDyadicImg

ilConfig

none

iflConfig

ilDyadicImg

ilOpImg

ilPolyadicImg

ilFDyadicImg

ilOpImg

ilFPolyadicImg

ilFFiltImg

ilOpImg

ilMonadicImg

ilFMagImg

ilOpImg

ilFPolarImg

ilFMonadicImg

ilOpImg

ilPolyadicImg

ilFPhaseImg

ilOpImg

ilFPolarImg

ilFSpectImg

ilOpImg

ilMonadicImg

ilIndexableList

ilList

None

ilLink

None

iflListItem

ilMaxImg

ilDyadicImg

ilPolyadicImg

ilMergeImg

ilImage

ilOpImg

ilMinImg

ilDyadicImg

ilPolyadicImg

ilMonadicImg

ilOpImg

ilPolyadicImg

ilMultiplyImg

ilDyadicImg

ilPolyadicImg

ilOrImg

ilDyadicImg

ilPolyadicImg

ilPropList

ilIndexableList

iflList

ilRoiImg

ilImage

ilCombineImg

ilSubImg

ilImage

ilOpImg

ilXorImg

ilDyadicImg

ilPolyadicImg