Mac OS X Reference Library Apple Developer
Search

CIImageAccumulator Class Reference

Inherits from
Conforms to
Framework
Library/Frameworks/QuartzCore.framework
Availability
Mac OS X v10.4 and later
Companion guide
Declared in
CIImageAccumulator.h
Related sample code

Overview

The CIImageAccumulator class enables feedback-based image processing for such things as iterative painting operations or fluid dynamics simulations. You use CIImageAccumulator objects in conjunction with other Core Image classes, such as CIFilter, CIImage, CIVector, and CIContext, to take advantage of the built-in Core Image filters when processing images.

Tasks

Creating an Image Accumulator

Initializing an Image Accumulator

Setting an Image

Obtaining Data From an Image Accumulator

Resetting an Accumulator

Class Methods

imageAccumulatorWithExtent:format:

Creates an image accumulator with the specified extent and pixel format.

+ (CIImageAccumulator *)imageAccumulatorWithExtent:(CGRect)r format:(CIFormat)f

Parameters
r

A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

f

The format and size of each pixel. You must supply a pixel format constant, such as kCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

Return Value

The image accumulator object.

Availability
  • Mac OS X v10.4 and later.
Declared In
CIImageAccumulator.h

Instance Methods

clear

Resets the accumulator, discarding any pending updates and the current content.

- (void)clear

Availability
  • Available in Mac OS X v10.5 and later.
Declared In
CIImageAccumulator.h

extent

Returns the extent of the image associated with the image accumulator.

- (CGRect)extent

Return Value

The rectangle that specifies the size of the image associated with the image accumulator. This rectangle is the size of the complete region of the working coordinate space, and is a fixed area. It specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

Availability
  • Mac OS X v10.4 and later.
Declared In
CIImageAccumulator.h

format

Returns the pixel format of the image accumulator.

- (CIFormat)format

Return Value

The pixel format of the image accumulator.

Availability
  • Mac OS X v10.4 and later.
Declared In
CIImageAccumulator.h

image

Returns the current contents of the image accumulator.

- (CIImage *)image

Return Value

The image object that represents the current contents of the image accumulator.

Availability
  • Mac OS X v10.4 and later.
Related Sample Code
Declared In
CIImageAccumulator.h

initWithExtent:format:

Initializes an image accumulator with the specified extent and pixel format.

- (id)initWithExtent:(CGRect)r format:(CIFormat)f

Parameters
r

A rectangle that specifies the x-value of the rectangle origin, the y-value of the rectangle origin, and the width and height.

f

The format and size of each pixel. You must supply a pixel format constant, such askCIFormatARGB8 (32 bit-per-pixel, fixed-point pixel format) or kCIFormatRGBAf (128 bit-per-pixel, floating-point pixel format). See CIImage Class Reference for more information about pixel format constants.

Return Value

The initialized image accumulator object.

Availability
  • Mac OS X v10.4 and later.
Related Sample Code
Declared In
CIImageAccumulator.h

setImage:

Sets the contents of the image accumulator to the contents of the specified image object.

- (void)setImage:(CIImage *)im

Parameters
im

The image object whose contents you want to assign to the image accumulator.

Availability
  • Mac OS X v10.4 and later.
Related Sample Code
Declared In
CIImageAccumulator.h

setImage:dirtyRect:

Updates an image accumulator with a subregion of an image object.

- (void)setImage:(CIImage *)im dirtyRect:(CGRect)r

Parameters
im

The image object whose contents you want to assign to the image accumulator.

r

A rectangle that defines the subregion of the image object that’s changed since the last time you updated the image accumulator. You must guarantee that the new contents differ from the old only within the region specified by the this argument.

Discussion

For additional details on using this method, see “Imaging Dynamical Systems” in Core Image Programming Guide.

Availability
  • Mac OS X v10.4 and later.
Declared In
CIImageAccumulator.h



Last updated: 2007-01-05

Did this document help you? Yes It's good, but... Not helpful...