Class MPSImageErode

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

    public class MPSImageErode
    extends MPSImageDilate
    MPSImageErode The MPSImageErode filter finds the minimum pixel value in a rectangular region centered around each pixel in the source image. It is like the MPSImageAreaMin, except that the intensity at each position is calculated relative to a different value before determining which is the maximum pixel value, allowing for shaped, non-rectangular morphological probes. [@code] for each pixel in the filter window: value = pixel[filterY][filterX] + filter[filterY*filter_width+filterX] if( value < bestValue ){ result = value bestValue = value; } [@endcode] A filter that contains all zeros is identical to a MPSImageAreaMin filter. The center filter element is assumed to be 0, to avoid causing a general lightening of the image. The definition of the filter for MPSImageErode is different from vImage. (MPSErode_filter_value = 1.0f-vImageErode_filter_value.) This allows MPSImageDilate and MPSImageErode to use the same filter, making open and close operators easier to write. The edgeMode property is assumed to always be MPSImageEdgeModeClamp for this filter. API-Since: 9.0
    • Constructor Detail

      • MPSImageErode

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static MPSImageErode 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()
      • 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)
      • resolveClassMethod

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

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

        public static void setVersion_static​(long aVersion)
      • superclass_static

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

        public static long version_static()
      • initWithDevice

        public MPSImageErode initWithDevice​(@NotNull
                                            @NotNull java.lang.Object device)
        Description copied from class: MPSUnaryImageKernel
        Standard init with default properties per filter type
        Overrides:
        initWithDevice in class MPSImageDilate
        Parameters:
        device - The device that the filter will be used on. May not be NULL.
        Returns:
        a pointer to the newly initialized object. This will fail, returning nil if the device is not supported. Devices must be MTLFeatureSet_iOS_GPUFamily2_v1 or later.
      • initWithDeviceKernelWidthKernelHeightValues

        public MPSImageErode initWithDeviceKernelWidthKernelHeightValues​(@NotNull
                                                                         @NotNull MTLDevice device,
                                                                         long kernelWidth,
                                                                         long kernelHeight,
                                                                         @NotNull
                                                                         @NotNull org.moe.natj.general.ptr.ConstFloatPtr values)
        Description copied from class: MPSImageDilate
        Init a object with kernel height, width and weight values. Each dilate shape probe defines a 3D surface of values. These are arranged in order left to right, then top to bottom in a 1D array. (values[kernelWidth*y+x] = probe[y][x]) Values should be generally be in the range [0,1] with the center pixel tending towards 0 and edges towards 1. However, any numerical value is allowed. Calculations are subject to the usual floating-point rounding error.
        Overrides:
        initWithDeviceKernelWidthKernelHeightValues in class MPSImageDilate
        Parameters:
        device - The device the filter will run on
        kernelWidth - The width of the kernel. Must be an odd number.
        kernelHeight - The height of the kernel. Must be an odd number.
        values - The set of values to use as the dilate probe. The values are copied into the filter. To avoid image ligthening or darkening, the center value should be 0.0f.
      • initWithCoderDevice

        public MPSImageErode initWithCoderDevice​(@NotNull
                                                 @NotNull NSCoder aDecoder,
                                                 @NotNull
                                                 @NotNull java.lang.Object device)
        Description copied from class: MPSImageDilate
        NSSecureCoding compatability While the standard NSSecureCoding/NSCoding method -initWithCoder: should work, since the file can't know which device your data is allocated on, we have to guess and may guess incorrectly. To avoid that problem, use initWithCoder:device instead.
        Overrides:
        initWithCoderDevice in class MPSImageDilate
        Parameters:
        aDecoder - The NSCoder subclass with your serialized MPSKernel
        device - The MTLDevice on which to make the MPSKernel
        Returns:
        A new MPSKernel object, or nil if failure. API-Since: 11.0
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _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
        Overrides:
        _supportsSecureCoding in class MPSImageDilate
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.