Class ClearCLHostImageBuffer

    • Field Detail

    • Constructor Detail

      • ClearCLHostImageBuffer

        public ClearCLHostImageBuffer​(ClearCLContext pClearCLContext,
                                      net.haesleinhuepf.clij.coremem.enums.NativeTypeEnum pNativeType,
                                      long pNumberOfChannels,
                                      long... pDimensions)
        Creates a host image buffer from a context, native type, number of channels, and dimensions.
        Parameters:
        pClearCLContext - context
        pNativeType - native type
        pNumberOfChannels - number of channels
        pDimensions - dimensions
      • ClearCLHostImageBuffer

        public ClearCLHostImageBuffer​(ClearCLContext pClearCLContext,
                                      net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemoryInterface,
                                      net.haesleinhuepf.clij.coremem.enums.NativeTypeEnum pNativeType,
                                      long pNumberOfChannels,
                                      long... pDimensions)
        Creates a host image buffer from a context, an existing contiguous memory object, native type, number of channels, and dimensions.
        Parameters:
        pClearCLContext - context
        pContiguousMemoryInterface - contiguous memory
        pNativeType - native type
        pNumberOfChannels - number of channels
        pDimensions - dimensions
    • Method Detail

      • allocateSameAs

        public static ClearCLHostImageBuffer allocateSameAs​(ClearCLImageInterface pClearCLImage)
        Allocates a host image buffer of same dimensions than a given image.
        Parameters:
        pClearCLImage - image template
        Returns:
        newly allocated image.
      • getContiguousMemory

        public net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface getContiguousMemory()
        Returns the contiguous memory object used to store the data.
        Returns:
        contiguous memory used internally
      • getSizeInBytes

        public long getSizeInBytes()
        Specified by:
        getSizeInBytes in interface net.haesleinhuepf.clij.coremem.interfaces.SizedInBytes
      • copyTo

        public void copyTo​(ClearCLImage pImage,
                           boolean pBlockingWrite)
        Description copied from interface: ClearCLImageInterface
        Copies the contents of this image to a given image.
        Specified by:
        copyTo in interface ClearCLImageInterface
        Parameters:
        pImage - destination image
        pBlockingWrite - trueblocking call, false asynchronous call
      • copyTo

        public void copyTo​(ClearCLBuffer pBuffer,
                           boolean pBlockingWrite)
        Description copied from interface: ClearCLImageInterface
        Copies the contents of this image to a given buffer.
        Specified by:
        copyTo in interface ClearCLImageInterface
        Parameters:
        pBuffer - destination buffer
        pBlockingWrite - trueblocking call, false asynchronous call
      • writeTo

        public void writeTo​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                            boolean pBlockingWrite)
        Description copied from interface: ClearCLImageInterface
        Copies image into CoreMem contiguous memory
        Specified by:
        writeTo in interface ClearCLImageInterface
        Parameters:
        pContiguousMemory - contiguous memory
        pBlockingWrite - trueblocking call, false asynchronous call
      • writeTo

        public void writeTo​(Buffer pBuffer,
                            boolean pBlockingWrite)
        Description copied from interface: ClearCLImageInterface
        Copies image into NIO buffer
        Specified by:
        writeTo in interface ClearCLImageInterface
        Parameters:
        pBuffer - NIO buffer
        pBlockingWrite - trueblocking call, false asynchronous call
      • readFrom

        public void readFrom​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                             boolean pBlockingRead)
        Description copied from interface: ClearCLImageInterface
        Copies image from CoreMem contiguous memory
        Specified by:
        readFrom in interface ClearCLImageInterface
        Parameters:
        pContiguousMemory - contiguous memory
        pBlockingRead - trueblocking call, false asynchronous call
      • readFrom

        public void readFrom​(Buffer pBuffer,
                             boolean pBlockingRead)
        Description copied from interface: ClearCLImageInterface
        Copies image into NIO buffer
        Specified by:
        readFrom in interface ClearCLImageInterface
        Parameters:
        pBuffer - NIO buffer
        pBlockingRead - trueblocking call, false asynchronous call