Class MPSImage

All Implemented Interfaces:
NSObjectProtocol, ObjCProtocol
Direct Known Subclasses:
MPSTemporaryImage

public class MPSImage
extends NSObject
Since:
Available in iOS 10.0 and later.
  • Constructor Details

  • Method Details

    • getDevice

      public MTLDevice getDevice()
    • getWidth

      public long getWidth()
    • getHeight

      public long getHeight()
    • getFeatureChannels

      public long getFeatureChannels()
    • getNumberOfImages

      public long getNumberOfImages()
    • getTextureType

      public MTLTextureType getTextureType()
    • getPixelFormat

      public MTLPixelFormat getPixelFormat()
    • getPrecision

      public long getPrecision()
    • getUsage

      public MTLTextureUsage getUsage()
    • getFeatureChannelFormat

      public MPSImageFeatureChannelFormat getFeatureChannelFormat()
    • getPixelSize

      public long getPixelSize()
    • getTexture

      public MTLTexture getTexture()
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel​(String v)
    • getParent

      public MPSImage getParent()
    • getImageType

      public MPSImageType getImageType()
    • init

      protected long init​(MTLDevice device, MPSImageDescriptor imageDescriptor)
    • init

      protected long init​(MPSImage parent, NSRange sliceRange, long featureChannels)
    • init

      protected long init​(MTLTexture texture, long featureChannels)
    • batchRepresentation

      public NSArray<MPSImage> batchRepresentation​(NSRange subRange)
    • batchRepresentation

      public NSArray<MPSImage> batchRepresentation()
    • subImage

      public MPSImage subImage​(NSRange range)
    • resourceSize

      public long resourceSize()
      Since:
      Available in iOS 11.0 and later.
    • setPurgeableState

      public MPSPurgeableState setPurgeableState​(MPSPurgeableState state)
    • readBytes

      public void readBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long bytesPerRow, MTLRegion region, MPSImageReadWriteParams featureChannelInfo, long imageIndex)
      Since:
      Available in iOS 11.0 and later.
    • writeBytes

      public void writeBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long bytesPerRow, MTLRegion region, MPSImageReadWriteParams featureChannelInfo, long imageIndex)
      Since:
      Available in iOS 11.0 and later.
    • writeBytes

      public void writeBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long bytesPerColumn, long bytesPerRow, long bytesPerImage, MTLRegion region, MPSImageReadWriteParams featureChannelInfo, long imageIndex)
      Since:
      Available in iOS 13.0 and later.
    • readBytes

      public void readBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long bytesPerRow, long bytesPerImage, MTLRegion region, MPSImageReadWriteParams featureChannelInfo, long imageIndex)
      Since:
      Available in iOS 11.0 and later.
    • writeBytes

      public void writeBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long bytesPerRow, long bytesPerImage, MTLRegion region, MPSImageReadWriteParams featureChannelInfo, long imageIndex)
      Since:
      Available in iOS 11.3 and later.
    • readBytes

      public void readBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long imageIndex)
      Since:
      Available in iOS 11.0 and later.
    • writeBytes

      public void writeBytes​(VoidPtr dataBytes, MPSDataLayout dataLayout, long imageIndex)
      Since:
      Available in iOS 11.0 and later.
    • synchronizeOnCommandBuffer

      public void synchronizeOnCommandBuffer​(MTLCommandBuffer commandBuffer)
      Since:
      Available in iOS 11.3 and later.
    • defaultAllocator

      public static MPSImageAllocator defaultAllocator()