Class CIFilter

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject

    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 java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

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

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

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

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

        public static 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

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

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

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

        public static CIFilter filterWithCVPixelBufferPropertiesOptions​(CVBufferRef pixelBuffer,
                                                                        NSDictionary<?,​?> properties,
                                                                        NSDictionary<java.lang.String,​?> options)
        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.
      • filterWithImageDataOptions

        public static CIFilter filterWithImageDataOptions​(NSData data,
                                                          NSDictionary<java.lang.String,​?> options)
        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.
      • filterWithImageURLOptions

        public static CIFilter filterWithImageURLOptions​(NSURL url,
                                                         NSDictionary<java.lang.String,​?> options)
        Returns a CIFilter that will in turn return a properly processed CIImage as "outputImage".
      • filterWithName

        public static CIFilter filterWithName​(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

        public static CIFilter filterWithNameKeysAndValues​(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

        public static CIFilter filterWithNameWithInputParameters​(java.lang.String name,
                                                                 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.
      • 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

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

        public static java.lang.String localizedDescriptionForFilterName​(java.lang.String filterName)
        Returns the localized description of a filter for display in the UI.
      • localizedNameForCategory

        public static java.lang.String localizedNameForCategory​(java.lang.String category)
        Returns the localized name of a category for display in the UI.
      • localizedNameForFilterName

        public static java.lang.String localizedNameForFilterName​(java.lang.String filterName)
        Returns the localized name of a filter for display in the UI.
      • localizedReferenceDocumentationForFilterName

        public static NSURL localizedReferenceDocumentationForFilterName​(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.
      • new_objc

        public static java.lang.Object new_objc()
      • registerFilterNameConstructorClassAttributes

        public static void registerFilterNameConstructorClassAttributes​(java.lang.String name,
                                                                        CIFilterConstructor anObject,
                                                                        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.
      • resolveClassMethod

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

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

        public static NSData serializedXMPFromFiltersInputImageExtent​(NSArray<? extends CIFilter> filters,
                                                                      CGRect extent)
        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.
      • 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

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

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

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

        public java.lang.String name()
      • outputImage

        public CIImage outputImage()
      • outputKeys

        public 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​(java.lang.String aString)
      • _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

        public static NSArray<java.lang.String> supportedRawCameraModels()
        Returns a NSArray containing the names of all supported RAW cameras.