Class CIFilter

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject
    Direct Known Subclasses:
    CIRAWFilter

    public class CIFilter
    extends NSObject
    implements NSSecureCoding, NSCopying
    CIFilter are filter objects for Core Image that encapsulate the filter with its attributes The CIFilter class produces a CIImage object as output. Typically, a filter takes one or more images as input. Some filters, however, generate an image based on other types of input parameters. The parameters of a CIFilter object are set and retrieved through the use of key-value pairs. You use the CIFilter object in conjunction with the CIImage, CIContext, CIVector, CIImageAccumulator, and CIColor objects to take advantage of the built-in Core Image filters when processing images. CIFilter objects are also used along with CIKernel, CISampler, and CIFilterShape objects to create custom filters.
    • Constructor Detail

      • CIFilter

        protected CIFilter​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • alloc

        public static CIFilter alloc()
      • allocWithZone

        public static CIFilter allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • filterArrayFromSerializedXMPInputImageExtentError

        @Deprecated
        @NotNull
        public static @NotNull NSArray<? extends CIFilter> filterArrayFromSerializedXMPInputImageExtentError​(@NotNull
                                                                                                             @NotNull NSData xmpData,
                                                                                                             CGRect extent,
                                                                                                             @Nullable
                                                                                                             @Nullable org.moe.natj.general.ptr.Ptr<NSError> outError)
        Deprecated.
        Return an array of CIFilters de-serialized from XMP data. API-Since: 6.0 Deprecated-Since: 17.0
      • filterNamesInCategories

        @NotNull
        public static @NotNull NSArray<java.lang.String> filterNamesInCategories​(@Nullable
                                                                                 @Nullable NSArray<java.lang.String> categories)
        Returns an array containing all published filter names that belong to all listed categories.
      • filterNamesInCategory

        @NotNull
        public static @NotNull NSArray<java.lang.String> filterNamesInCategory​(@Nullable
                                                                               @Nullable java.lang.String category)
        Returns an array containing all published filter names in a category.
      • filterWithCVPixelBufferPropertiesOptions

        @Deprecated
        public static CIFilter filterWithCVPixelBufferPropertiesOptions​(CVBufferRef pixelBuffer,
                                                                        NSDictionary<?,​?> properties,
                                                                        NSDictionary<java.lang.String,​?> options)
        Deprecated.
        Returns a CIFilter that will in turn return a properly processed CIImage as "outputImage". Note that when using this initializer, you should pass in a CVPixelBufferRef with one of the following Raw pixel format types kCVPixelFormatType_14Bayer_GRBG, kCVPixelFormatType_14Bayer_RGGB, kCVPixelFormatType_14Bayer_BGGR, kCVPixelFormatType_14Bayer_GBRG as well as the root properties attachment from the CMSampleBufferRef. API-Since: 10.0 Deprecated-Since: 100000.0 Deprecated-Message: Use new CIRAWFilter class instead.
      • filterWithImageDataOptions

        @Deprecated
        public static CIFilter filterWithImageDataOptions​(NSData data,
                                                          NSDictionary<java.lang.String,​?> options)
        Deprecated.
        Returns a CIFilter that will in turn return a properly processed CIImage as "outputImage". Note that when using this initializer, you should pass in a source type identifier hint (kCGImageSourceTypeIdentifierHint) key/value pair in order to help the decoder determine the file type, as otherwise confusion and incorrect results are possible. API-Since: 10.0 Deprecated-Since: 100000.0 Deprecated-Message: Use new CIRAWFilter class instead.
      • filterWithImageURLOptions

        @Deprecated
        public static CIFilter filterWithImageURLOptions​(NSURL url,
                                                         NSDictionary<java.lang.String,​?> options)
        Deprecated.
        Returns a CIFilter that will in turn return a properly processed CIImage as "outputImage". API-Since: 10.0 Deprecated-Since: 100000.0 Deprecated-Message: Use new CIRAWFilter class instead.
      • filterWithName

        @Nullable
        public static @Nullable CIFilter filterWithName​(@NotNull
                                                        @NotNull java.lang.String name)
        Creates a new filter of type 'name'. On OSX, all input values will be undefined. On iOS, all input values will be set to default values.
      • filterWithNameKeysAndValues

        @Nullable
        public static @Nullable CIFilter filterWithNameKeysAndValues​(@NotNull
                                                                     @NotNull java.lang.String name,
                                                                     java.lang.Object key0,
                                                                     java.lang.Object... varargs)
        Creates a new filter of type 'name'. The filter's input parameters are set from the list of key-value pairs which must be nil-terminated. On OSX, any of the filter input parameters not specified in the list will be undefined. On iOS, any of the filter input parameters not specified in the list will be set to default values.
      • filterWithNameWithInputParameters

        @Nullable
        public static @Nullable CIFilter filterWithNameWithInputParameters​(@NotNull
                                                                           @NotNull java.lang.String name,
                                                                           @Nullable
                                                                           @Nullable NSDictionary<java.lang.String,​?> params)
        Creates a new filter of type 'name'. The filter's input parameters are set from the dictionary of key-value pairs. On OSX, any of the filter input parameters not specified in the dictionary will be undefined. On iOS, any of the filter input parameters not specified in the dictionary will be set to default values. API-Since: 8.0
      • hash_static

        public static long hash_static()
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • localizedDescriptionForFilterName

        @Nullable
        public static @Nullable java.lang.String localizedDescriptionForFilterName​(@NotNull
                                                                                   @NotNull java.lang.String filterName)
        Returns the localized description of a filter for display in the UI. API-Since: 9.0
      • localizedNameForCategory

        @NotNull
        public static @NotNull java.lang.String localizedNameForCategory​(@NotNull
                                                                         @NotNull java.lang.String category)
        Returns the localized name of a category for display in the UI. API-Since: 9.0
      • localizedNameForFilterName

        @Nullable
        public static @Nullable java.lang.String localizedNameForFilterName​(@NotNull
                                                                            @NotNull java.lang.String filterName)
        Returns the localized name of a filter for display in the UI. API-Since: 9.0
      • localizedReferenceDocumentationForFilterName

        @Nullable
        public static @Nullable NSURL localizedReferenceDocumentationForFilterName​(@NotNull
                                                                                   @NotNull java.lang.String filterName)
        Returns the URL to the localized reference documentation describing the filter. The URL can be a local file or a remote document on a webserver. It is possible, that this method returns nil (like filters that predate this feature). A client of this API has to handle this case gracefully. API-Since: 9.0
      • new_objc

        public static CIFilter new_objc()
      • registerFilterNameConstructorClassAttributes

        public static void registerFilterNameConstructorClassAttributes​(@NotNull
                                                                        @NotNull java.lang.String name,
                                                                        @NotNull
                                                                        @NotNull CIFilterConstructor anObject,
                                                                        @NotNull
                                                                        @NotNull NSDictionary<java.lang.String,​?> attributes)
        Publishes a new filter called 'name'. The constructor object 'anObject' should implement the filterWithName: method. That method will be invoked with the name of the filter to create. The class attributes must have a kCIAttributeFilterCategories key associated with a set of categories.
        Parameters:
        attributes - Dictionary of the registration attributes of the filter. See below for attribute keys. API-Since: 9.0
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • serializedXMPFromFiltersInputImageExtent

        @Deprecated
        @Nullable
        public static @Nullable NSData serializedXMPFromFiltersInputImageExtent​(@NotNull
                                                                                @NotNull NSArray<? extends CIFilter> filters,
                                                                                CGRect extent)
        Deprecated.
        Given an array of filters, serialize the filters' parameters into XMP form that is suitable for embedding in to an image. At this time the only filters classes that are serialized are, CIAffineTransform, CICrop, and the filters returned by [CIImage autoAdjustmentFilters]. The parameters of other filter classes will not be serialized. The return value will be null if none of the filters can be serialized. API-Since: 6.0 Deprecated-Since: 17.0
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • version_static

        public static long version_static()
      • attributes

        @NotNull
        public @NotNull NSDictionary<java.lang.String,​?> attributes()
        Returns a dictionary containing key/value pairs describing the filter. (see description of keys below)
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • inputKeys

        @NotNull
        public @NotNull NSArray<java.lang.String> inputKeys()
        Returns an array containing the names of all inputs in the filter.
      • name

        @NotNull
        public @NotNull java.lang.String name()
        API-Since: 5.0
      • outputImage

        @Nullable
        public @Nullable CIImage outputImage()
        API-Since: 5.0
      • outputKeys

        @NotNull
        public @NotNull NSArray<java.lang.String> outputKeys()
        Returns an array containing the names of all outputs in the filter.
      • setDefaults

        public void setDefaults()
        Sets all inputs to their default values (where default values are defined, other inputs are left as-is).
      • setName

        public void setName​(@NotNull
                            @NotNull java.lang.String aString)
        API-Since: 10.0
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • supportedRawCameraModels

        @Deprecated
        public static NSArray<java.lang.String> supportedRawCameraModels()
        Deprecated.
        Returns a NSArray containing the names of all supported RAW cameras. API-Since: 13.0 Deprecated-Since: 100000.0 Deprecated-Message: Use new CIRAWFilter class instead.
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.