Orfeo ToolBox  4.2
Orfeo ToolBox is not a black box
Classes
+ Collaboration diagram for Image Adaptors:

Classes

class  otb::ShiftScaleImageAdaptor< TImage, TOutputPixelType >
 Presents an image as being composed of the shift scale operation of its pixels. More...
 
class  otb::Accessor::ShiftScalePixelAccessor< TPixelType, TExternalType >
 Apply a shift scale operation to the value. More...
 
class  otb::VectorImageToASImageAdaptor< TImage >
 Presents an image of pixel type Vector as being and image of FixelArray<unsigned short, 3> type. More...
 
class  otb::Accessor::VectorImageToASPixelAccessor< T >
 Give access to a Vector pixel type as if it were a RGBPixel type. More...
 

Detailed Description

Image Adaptors are an implementation of the Adaptor Design Pattern. They are designed to present an image of a particular type as being an image of a different type. Adaptors perform simple operations on pixel values for which is not easy to justify the use of an image filter.

One of the principal tasks of ImageAdaptors is to perform casting.

For example: you have an image whose pixels are of type unsigned char and you need to feed this image in a process that expects pixels of type double. You have the option of using and ImageFilter that convert the input unsigned char image into another of pixel type double. However this filter will allocate memory for this second image and will need to be executed. Image Adaptors allow to simulate that you have made the conversion but will avoid the overhead in memory. There is however a penalty in performance.

The mechanism used by image adaptors is to provide a simple function that will be used by ImageIterator (see Image Iterators) to convert the value of a pixel, in a pixel-by-pixel basis.