CIKMeans

Trait CIKMeans 

Source
pub unsafe trait CIKMeans: CIAreaReductionFilter {
    // Provided methods
    unsafe fn inputMeans(&self) -> Option<Retained<CIImage>>
       where Self: Sized + Message { ... }
    unsafe fn setInputMeans(&self, input_means: Option<&CIImage>)
       where Self: Sized + Message { ... }
    unsafe fn count(&self) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn setCount(&self, count: NSInteger)
       where Self: Sized + Message { ... }
    unsafe fn passes(&self) -> c_float
       where Self: Sized + Message { ... }
    unsafe fn setPasses(&self, passes: c_float)
       where Self: Sized + Message { ... }
    unsafe fn perceptual(&self) -> bool
       where Self: Sized + Message { ... }
    unsafe fn setPerceptual(&self, perceptual: bool)
       where Self: Sized + Message { ... }
}
Available on crate features CIFilter and CIFilterBuiltins only.
Expand description

The protocol for the KMeans filter.

Create a palette of the most common colors found in the image.

See also Apple’s documentation

Provided Methods§

Source

unsafe fn inputMeans(&self) -> Option<Retained<CIImage>>
where Self: Sized + Message,

Available on crate feature CIImage only.

Specifies the color seeds to use for k-means clustering, either passed as an image or an array of colors.

Source

unsafe fn setInputMeans(&self, input_means: Option<&CIImage>)
where Self: Sized + Message,

Available on crate feature CIImage only.

Setter for inputMeans.

Source

unsafe fn count(&self) -> NSInteger
where Self: Sized + Message,

Specifies how many k-means color clusters should be used.

Source

unsafe fn setCount(&self, count: NSInteger)
where Self: Sized + Message,

Setter for count.

Source

unsafe fn passes(&self) -> c_float
where Self: Sized + Message,

Specifies how many k-means passes should be performed.

Source

unsafe fn setPasses(&self, passes: c_float)
where Self: Sized + Message,

Setter for passes.

Source

unsafe fn perceptual(&self) -> bool
where Self: Sized + Message,

Specifies whether the k-means color palette should be computed in a perceptual color space.

Source

unsafe fn setPerceptual(&self, perceptual: bool)
where Self: Sized + Message,

Setter for perceptual.

Trait Implementations§

Source§

impl ProtocolType for dyn CIKMeans

Source§

const NAME: &'static str = "CIKMeans"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn CIKMeans
where T: ?Sized + Message + CIKMeans,

Implementations on Foreign Types§

Source§

impl<T> CIKMeans for ProtocolObject<T>
where T: ?Sized + CIKMeans,

Implementors§