Lynkeos
Instance Methods | List of all members
<LynkeosImageBuffer> Protocol Reference

Generic image management. More...

#import <LynkeosImageBuffer.h>

Inheritance diagram for <LynkeosImageBuffer>:
Inheritance graph
[legend]
Collaboration diagram for <LynkeosImageBuffer>:
Collaboration graph
[legend]

Instance Methods

(size_t) - memorySize
 The memory size occupied by this item. More...
 
(u_short) - width
 Get the image pixels width. More...
 
(u_short) - height
 Get the image pixels height. More...
 
(u_short) - numberOfPlanes
 Get the number of color planes. More...
 
(NSBitmapImageRep *) - getNSImageWithBlack:white:gamma:
 Retrieve a Cocoa 24 bits RGB bitmap representation. More...
 
(void) - add:
 Add another image buffer. More...
 
(void) - calibrateWithDarkFrame:flatField:atX:Y:
 Calibrate the image with the calibration images. More...
 
(void) - normalizeWithFactor:mono:
 Multiplies all values with a scalar. More...
 
(void) - convertToPlanar:withPrecision:withPlanes:lineWidth:
 Convert the image buffer data to a floating precision planar representation. More...
 
(void) - clear
 Clear the image contents ; all samples are zeroes.
 

Detailed Description

Generic image management.

Method Documentation

- (void) add: (id< LynkeosImageBuffer >)  image

Add another image buffer.

The image to add shall be an instance of the same class as self and have the same size (method implementation can rely on this).

Parameters
imageThe image to add
- (void) calibrateWithDarkFrame: (id< LynkeosImageBuffer >)  darkFrame
flatField: (id< LynkeosImageBuffer >)  flatField
atX: (u_short)  ox
Y: (u_short)  oy 

Calibrate the image with the calibration images.

darkFrame and flatField, when present, are instances of the same class as self. They are "full sensor" images.

The darkFrame, if any, shall be substracted from the image and the result shall be divided by the flatField, if any.

The coordinates are specified using the same orientation as in LynkeosFileReader

Parameters
darkFrameThe dark frame image, nil if not present
flatFieldThe flat field image, nil if not present
oxThe X origin of our image in the full sensor frame.
oyThe Y origin of our image in the full sensor frame.
- (void) convertToPlanar: (void *const *const)  planes
withPrecision: (floating_precision_t precision
withPlanes: (u_short)  nPlanes
lineWidth: (u_short)  lineW 

Convert the image buffer data to a floating precision planar representation.

The pixels ordering is the same as in LynkeosFileReader.

Parameters
planesThe color planes to fill with the image data. There are as many planes as there are in this instance and their size is the same as this instance's image.
nPlanesNumber of planes in the output buffer.
precisionThe floating precision of pixels in the output buffer.
lineWThe line width of the output buffer (may be larger than this instance's image width).
- (NSBitmapImageRep*) getNSImageWithBlack: (double *)  black
white: (double *)  white
gamma: (double *)  gamma 

Retrieve a Cocoa 24 bits RGB bitmap representation.

The black, white and gamma are arrays of values for each plane, and a last "global" value that is applied equally on each plane.

Parameters
blackBlack level for conversion for each plane
whiteWhite level for conversion for each plane
gammaGamma correction exponent for each plane (ie: 1 = no correction)
Returns
The 8 bits RGB bitmap representation of the buffer data
- (u_short) height
- (size_t) memorySize

The memory size occupied by this item.

The object shall use class_getInstanceSize and add the size of any aggregated objects and "mallocated" buffers.

Returns
The item's size
- (void) normalizeWithFactor: (double)  factor
mono: (BOOL)  mono 

Multiplies all values with a scalar.

Parameters
factorThe value by which each pixel is multiplied. If 0, the factor is taken as to set the maximum value of the resulting image to 1.0
monoIf true and factor is zero, the color planes are leveled to obtain a non color biased image
- (u_short) numberOfPlanes
- (u_short) width

The documentation for this protocol was generated from the following file: