CISampler Class Reference
| Inherits from | |
| Conforms to | |
| Framework | Library/Frameworks/QuartzCore.framework |
| Availability | OS X v10.4 and later |
| Companion guide | |
| Declared in | CISampler.h |
Overview
The CISampler class retrieves samples of images for processing by a CIKernel object. A CISampler object defines a coordinate transform, and modes for interpolation and wrapping. You use CISampler objects in conjunction with other Core Image classes, such as CIFilter, CIKernel, and CIFilterShape, to create custom filters.
Class Methods
samplerWithImage:
Creates and returns a sampler that references an image.
Parameters
- im
The image that you want the sampler to reference.
Return Value
A sampler object that references the image specified by the im argument.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hsamplerWithImage:keysAndValues:
Creates and returns a sampler that references an image using options specified as key-value pairs.
Parameters
- im
The image that you want the sampler to reference.
- key0
A list of key-value pairs that represent options. Each key needs to be followed by that appropriate value. You can supply one or more key-value pairs. Use
nilto specify the end of the key-value options. See“Sampler Option Keys”.
Return Value
A sampler that references the image specified by the im argument and uses the specified options.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hsamplerWithImage:options:
Creates and returns a sampler that references an image using options specified in a dictionary.
Parameters
- im
The image that you want the sampler to reference.
- dict
A dictionary that contains options specified as key-value pairs. See
“Sampler Option Keys”.
Return Value
A sampler that references the image specified by the im argument and uses the options specified in the dictionary.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hInstance Methods
definition
Gets the domain of definition (DOD) of the sampler.
Return Value
The filter shape object that contains the DOD.
Discussion
The DOD contains all nontransparent pixels produced by referencing the sampler.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hextent
Gets the rectangle that specifies the extent of the sampler.
Return Value
The rectangle that specifies the area outside which the wrap mode set for the sampler is invoked.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hinitWithImage:
Initializes a sampler with an image object.
Parameters
- im
The image object to initialize the sampler with.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hinitWithImage:keysAndValues:
Initializes the sampler with an image object using options specified as key-value pairs.
Parameters
- im
The image object to initialize the sampler with.
- key0
A list of key-value pairs that represent options. Each key needs to be followed by that appropriate value. You can supply one or more key-value pairs. Use
nilto specify the end of the key-value options. See“Sampler Option Keys”.
Availability
- OS X v10.4 and later.
See Also
Declared In
CISampler.hinitWithImage:options:
Initializes the sampler with an image object using options specified in a dictionary.
Parameters
- im
The image to initialize the sampler with.
- dict
A dictionary that contains options specified as key-value pairs. See
“Sampler Option Keys”.
Availability
- OS X v10.4 and later.
Declared In
CISampler.hConstants
Sampler Option Keys
Keys for creating a sampler.
extern NSString *kCISamplerAffineMatrix; extern NSString *kCISamplerWrapMode; extern NSString *kCISamplerFilterMode
Constants
kCISamplerAffineMatrixThe key for an affine matrix. The associated value is an
NSArrayobject ([a b c d tx ty]) that defines the transformation to apply to the sampler.Available in OS X v10.4 and later.
Declared in
CISampler.h.kCISamplerWrapModeThe key for the sampler wrap mode. The wrap mode specifies how Core Image produces pixels that are outside the extent of the sample. Possible values are
kCISamplerWrapBlackandkCISamplerWrapClamp.Available in OS X v10.4 and later.
Declared in
CISampler.h.kCISamplerFilterModeThe key for the filtering to use when sampling the image. Possible values are
kCISamplerFilterNearestandkCISamplerFilterLinear.Available in OS X v10.4 and later.
Declared in
CISampler.h.
Declared In
CISampler.hSampler Option Values
Values for sampler option keys.
extern NSString *kCISamplerWrapBlack; extern NSString *kCISamplerWrapClamp; extern NSString *kCISamplerFilterNearest; extern NSString *kCISamplerFilterLinear;
Constants
kCISamplerWrapBlackPixels are transparent black.
Available in OS X v10.4 and later.
Declared in
CISampler.h.kCISamplerWrapClampCoordinates are clamped to the extent.
Available in OS X v10.4 and later.
Declared in
CISampler.h.kCISamplerFilterNearestNearest neighbor sampling.
Available in OS X v10.4 and later.
Declared in
CISampler.h.kCISamplerFilterLinearBilinear interpolation.
Available in OS X v10.4 and later.
Declared in
CISampler.h.
Declared In
CISampler.h© 2006 Apple Computer, Inc. All Rights Reserved. (Last updated: 2006-12-07)