Lynkeos
|
Class used to wrap the Fourier transform with FFTW library. More...
#import <LynkeosFourierBuffer.h>
Instance Methods | |
(id) | - initWithNumberOfPlanes:width:height:withGoal: |
Allocates a new empty buffer. More... | |
(id) | - initWithNumberOfPlanes:width:height:withGoal:isSpectrum: |
Allocates a new empty buffer. More... | |
(BOOL) | - isSpectrum |
Tells whether the instance is a spectrum or an image. More... | |
(void) | - directTransform |
Compute the direct transform. More... | |
(void) | - inverseTransform |
Compute the inverse transform, normalize the result and returns the values extremes. | |
(void) | - normalize |
Normalize the spectrum to a 1.0 continous level. | |
(void) | - conjugate |
Transform the spectrum pixels into their conjugate. | |
(void) | - multiplyWithConjugateOf:result: |
Multiplication with conjugate. More... | |
![]() | |
(id) | - initWithNumberOfPlanes:width:height: |
Allocates a new empty buffer. More... | |
(id) | - initWithData:copy:freeWhenDone:numberOfPlanes:width:paddedWidth:height: |
Initialize a new buffer with preexisting data. More... | |
(void) | - setOperatorsStrategy: |
Change the strategy of arithmetic operators. More... | |
(void) | - resetMinMax |
Reset the min and max to unset values. | |
(void) | - getMinLevel:maxLevel: |
Get the minimum and maximum pixels value. More... | |
(void) | - getMinLevel:maxLevel:forPlane: |
Get the minimum and maximum pixels value for a given plane. More... | |
(void *const *const) | - colorPlanes |
Access to the color planes. More... | |
(void) | - extractSample:atX:Y:withWidth:height:withPlanes:lineWidth: |
Extract a rectangle in the image. | |
(void) | - substract: |
Substract an image from another. More... | |
(void) | - add:withOffsets:withExpansion: |
Shifts another image and add it to this one. More... | |
(void) | - multiplyWith:result: |
Multiplication. More... | |
(void) | - substractBias:andScale: |
Substract and multiply with scalars. More... | |
(void) | - multiplyWithScalar: |
Multiplication with a scalar. More... | |
(void) | - divideBy:result: |
Division. More... | |
![]() | |
(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. | |
Class Methods | |
(LynkeosFourierBuffer *) | + fourierBufferWithNumberOfPlanes:width:height:withGoal: |
Allocates a new empty buffer. More... | |
![]() | |
(LynkeosStandardImageBuffer *) | + imageBufferWithNumberOfPlanes:width:height: |
Convenience empty image buffer creator. More... | |
(LynkeosStandardImageBuffer *) | + imageBufferWithData:copy:freeWhenDone:numberOfPlanes:width:paddedWidth:height: |
Convenience initialized image buffer creator. More... | |
Public Attributes | |
u_short | _halfw |
The spectrum has only half the image width (complex pixels) | |
u_short | _spadw |
Spectrum padded width. | |
![]() | |
u_short | _nPlanes |
Number of color planes. | |
u_short | _w |
Image pixels width. | |
u_short | _h |
Image pixels width. | |
u_short | _padw |
Padded line width (>= width) | |
void * | _data |
Pixel buffer, the planes are consecutive. | |
Related Functions | |
(Note that these are not member functions.) | |
#define | stdColorComplexValue(buf, p, x, y, c) |
Access to the complex value of a pixel in the spectrum. More... | |
![]() | |
#define | stdColorValue(buf, prec, x, y, c) |
Access to one color component of a pixel. More... | |
Additional Inherited Members | |
![]() | |
void * | _planes [3] |
Shortcuts to the color planes. | |
BOOL | _freeWhenDone |
Whether to free the planes on dealloc. | |
double | _min [4] |
The image minimum value. | |
double | _max [4] |
The image maximum value. | |
ImageProcessOneLine_t | _mul_one_image_line |
Strategy method for multiplying a line, with vectorization, or not. | |
ImageProcessOneLine_t | _scale_one_image_line |
Strategy method for scaling a line, with vectorization, or not. | |
ImageProcessOneLine_t | _div_one_image_line |
Strategy method for dividing a line, with vectorization, or not. | |
ImageProcessOneLine_t | _bias_scale_one_image_line |
Strategy method for substract and multiply, with vectorization, or not. | |
SEL | _process_image_selector |
Strategy method for processing an image, actually for debug. | |
void(* | _process_image )(id, SEL, ArithmeticOperand_t *, LynkeosStandardImageBuffer *res, ImageProcessOneLine_t) |
Strategy method for processing an image, func pointer which is called. | |
Class used to wrap the Fourier transform with FFTW library.
- (void) directTransform |
Compute the direct transform.
References FOR_DIRECT, and LynkeosStandardImageBuffer::resetMinMax.
Referenced by correlate(), and filterImageForAnalysis().
+ (LynkeosFourierBuffer *) fourierBufferWithNumberOfPlanes: | (u_char) | nPlanes | |
width: | (u_short) | w | |
height: | (u_short) | h | |
withGoal: | (u_char) | goal | |
Allocates a new empty buffer.
nPlanes | Number of color planes for this image |
w | Image pixels width |
h | Image pixels height |
goal | What kind of transform to prepare, direct, inverse or both. |
References <LynkeosImageBuffer>::height, and <LynkeosImageBuffer>::width.
- (id) initWithNumberOfPlanes: | (u_char) | nPlanes | |
width: | (u_short) | w | |
height: | (u_short) | h | |
withGoal: | (u_char) | goal | |
Allocates a new empty buffer.
nPlanes | Number of color planes for this image |
w | Image pixels width |
h | Image pixels height |
goal | What kind of transform to prepare, direct, inverse or both. |
References <LynkeosImageBuffer>::height, isSpectrum, and <LynkeosImageBuffer>::width.
- (id) initWithNumberOfPlanes: | (u_char) | nPlanes | |
width: | (u_short) | w | |
height: | (u_short) | h | |
withGoal: | (u_char) | goal | |
isSpectrum: | (BOOL) | isSpectrum | |
Allocates a new empty buffer.
nPlanes | Number of color planes for this image |
w | Image pixels width |
h | Image pixels height |
goal | What kind of transform to prepare, direct, inverse or both. |
isSpectrum | Whether the initial data is a spectrum |
References LynkeosStandardImageBuffer::_data, LynkeosStandardImageBuffer::_freeWhenDone, LynkeosStandardImageBuffer::_h, _halfw, LynkeosStandardImageBuffer::_nPlanes, LynkeosStandardImageBuffer::_padw, LynkeosStandardImageBuffer::_planes, _spadw, LynkeosStandardImageBuffer::_w, FOR_DIRECT, FOR_INVERSE, and isSpectrum.
- (BOOL) isSpectrum |
Tells whether the instance is a spectrum or an image.
Referenced by initWithNumberOfPlanes:width:height:withGoal:, and initWithNumberOfPlanes:width:height:withGoal:isSpectrum:.
- (void) multiplyWithConjugateOf: | (LynkeosFourierBuffer*) | term | |
result: | (LynkeosFourierBuffer*) | result | |
Multiplication with conjugate.
term shall either have the same number of planes as the receiver or only one plane. In the latter case, the plane is applied to each planes of the receiver.
term | other term (shall be a spectrum) |
result | where the result is stored, can be one of the terms |
References LynkeosStandardImageBuffer::_h, LynkeosStandardImageBuffer::_nPlanes, LynkeosStandardImageBuffer::_process_image, LynkeosStandardImageBuffer::_process_image_selector, LynkeosStandardImageBuffer::_w, and ArithmeticOperand_t::term.
Referenced by correlate_spectrums().
|
related |
Access to the complex value of a pixel in the spectrum.
This method is provided as a macro for speed purpose.
buf | The fourier buffer |
p | The processing precision |
x | The X coordinate of the pixel |
y | The Y coordinate of the pixel |
c | The color plane |