Class ClearCLImage

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected String name  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void copyTo​(ClearCLBuffer pDstBuffer, boolean pBlockingCopy)
      Copies this image into an (OpenCl) buffer.
      void copyTo​(ClearCLBuffer pDstBuffer, long[] pOriginInSrcImage, long[] pRegionInSrcImage, long pOffsetInDstBuffer, boolean pBlockingCopy)
      Copies a nD region from this image into a nD region of same dimensions into a (OpenCl) buffer.
      void copyTo​(ClearCLHostImageBuffer pClearCLHostImage, boolean pBlockingCopy)
      Copies this buffer into a host image.
      void copyTo​(ClearCLImage pDstImage, boolean pBlockingCopy)
      Copies this image to another image of same dimensions.
      void copyTo​(ClearCLImage pDstImage, long[] pOriginInSrcImage, long[] pOriginInDstImage, long[] pRegion, boolean pBlockingCopy)
      Copies a nD region form this image to a nD region of same dimensions in another image.
      void fill​(float[] pRGBA, boolean pBlockingFill, boolean pNotifyListeners)
      Fills this image with a float RGBA 'color'.
      void fill​(float[] pRGBA, long[] pOrigin, long[] pRegion, boolean pBlockingFill, boolean pNotifyListeners)
      Fills a nD region of this image with a RGBA float 'color'.
      void fill​(float pColor, boolean pBlockingFill, boolean pNotifyListeners)
      Fills this image with a single channel 'color'.
      void fill​(int[] pRGBA, boolean pBlockingFill, boolean pNotifyListeners)
      Fills this image with an int RGBA 'color'.
      void fill​(int[] pRGBA, long[] pOrigin, long[] pRegion, boolean pBlockingFill, boolean pNotifyListeners)
      Fills a nD region of this image with a RGBA int 'color'.
      void fill​(int pColor, boolean pBlockingFill, boolean pNotifyListeners)
      Fills this image with a single channel 'color'.
      void fillZero​(boolean pBlockingFill, boolean pNotifyListeners)
      Fills this image with zeros.
      ImageChannelDataType getChannelDataType()
      Returns image channel type
      ImageChannelOrder getChannelOrder()
      Returns image type
      ClearCLContext getContext()
      Returns the context for this image.
      long[] getDimensions()
      Returns this image dimensions.
      ImageType getImageType()
      Returns image type
      String getName()  
      net.haesleinhuepf.clij.coremem.enums.NativeTypeEnum getNativeType()
      Returns native type
      long getNumberOfChannels()
      Returns the number of channels in this image
      long getSizeInBytes()  
      boolean isFloat()
      Returns whether this image data type is float
      boolean isInteger()
      Returns whether this image data type is integer
      boolean isNormalized()
      Returns whether this image is normalized (values between 0 and 1)
      boolean isSigned()
      Returns whether this image data type has a sign
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(byte[] pByteArray, boolean pBlockingRead)
      Reads from a Java byte array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(char[] pCharArray, boolean pBlockingRead)
      Reads from a Java char array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(double[] pDoubleArray, boolean pBlockingRead)
      Reads from a Java double array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(float[] pFloatArray, boolean pBlockingRead)
      Reads from a Java float array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(int[] pIntArray, boolean pBlockingRead)
      Reads from a Java int array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(long[] pLongArray, boolean pBlockingRead)
      Reads from a Java long array into this image.
      net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(short[] pShortsArray, boolean pBlockingRead)
      Reads from a Java short array into this image.
      void readFrom​(Buffer pBuffer, boolean pBlockingRead)
      Reads from a NIO buffer into this image.
      void readFrom​(Buffer pBuffer, long[] pOrigin, long[] pRegion, boolean pBlockingRead)
      Reads from a NIO buffer into a nD region of this image.
      void readFrom​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory, boolean pBlockingRead)
      Reads from a CoreMem contiguous buffer into this image.
      void readFrom​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory, long[] pOrigin, long[] pRegion, boolean pBlockingRead)
      Reads from a CoreMem buffer into a nD region of this image.
      void readFrom​(net.haesleinhuepf.clij.coremem.fragmented.FragmentedMemoryInterface pFragmentedMemory, boolean pBlockingRead)
      Reads from a CoreMem fragmented buffer into this image.
      void readFrom​(net.haesleinhuepf.clij.coremem.fragmented.FragmentedMemoryInterface pFragmentedMemory, long[] pOrigin, long[] pRegion, boolean pBlockingRead)
      Reads from a CoreMem fragmented buffer into a nD region of this image.
      void setName​(String name)  
      String toString()  
      void writeTo​(Buffer pBuffer, boolean pBlockingRead)
      Writes a nD region of this image to a NIO buffer.
      void writeTo​(Buffer pBuffer, long[] pOrigin, long[] pRegion, boolean pBlockingRead)
      Writes a nD region of this image to a NIO buffer.
      void writeTo​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory, boolean pBlockingRead)
      Writes a this image to a CoreMem buffer.
      void writeTo​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory, long[] pOrigin, long[] pRegion, boolean pBlockingRead)
      Writes a nD region of this image to a CoreMem buffer.
    • Field Detail

    • Method Detail

      • fillZero

        public void fillZero​(boolean pBlockingFill,
                             boolean pNotifyListeners)
        Fills this image with zeros.
        Parameters:
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(float pColor,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills this image with a single channel 'color'.
        Parameters:
        pColor - single channel float color
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(int pColor,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills this image with a single channel 'color'.
        Parameters:
        pColor - single channel int color
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(float[] pRGBA,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills this image with a float RGBA 'color'.
        Parameters:
        pRGBA - four float color
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(int[] pRGBA,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills this image with an int RGBA 'color'.
        Parameters:
        pRGBA - four int color
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(float[] pRGBA,
                         long[] pOrigin,
                         long[] pRegion,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills a nD region of this image with a RGBA float 'color'.
        Parameters:
        pRGBA - four float color
        pOrigin - region origin
        pRegion - region dimensions
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • fill

        public void fill​(int[] pRGBA,
                         long[] pOrigin,
                         long[] pRegion,
                         boolean pBlockingFill,
                         boolean pNotifyListeners)
        Fills a nD region of this image with a RGBA int 'color'.
        Parameters:
        pRGBA - four int color
        pOrigin - region origin
        pRegion - region dimensions
        pBlockingFill - true blocking call, false asynchronous call
        pNotifyListeners - true notify listeners, false do not notify
      • copyTo

        public void copyTo​(ClearCLImage pDstImage,
                           boolean pBlockingCopy)
        Copies this image to another image of same dimensions.
        Specified by:
        copyTo in interface ClearCLImageInterface
        Parameters:
        pDstImage - destination image
        pBlockingCopy - true blocking call, false asynchronous call
      • copyTo

        public void copyTo​(ClearCLImage pDstImage,
                           long[] pOriginInSrcImage,
                           long[] pOriginInDstImage,
                           long[] pRegion,
                           boolean pBlockingCopy)
        Copies a nD region form this image to a nD region of same dimensions in another image.
        Parameters:
        pDstImage - destination image
        pOriginInSrcImage - origin in source image
        pOriginInDstImage - origin in destination image
        pRegion - region dimensions
        pBlockingCopy - true blocking call, false asynchronous call
      • copyTo

        public void copyTo​(ClearCLBuffer pDstBuffer,
                           boolean pBlockingCopy)
        Copies this image into an (OpenCl) buffer.
        Specified by:
        copyTo in interface ClearCLImageInterface
        Parameters:
        pDstBuffer - destination buffer
        pBlockingCopy - true blocking call, false asynchronous call
      • copyTo

        public void copyTo​(ClearCLBuffer pDstBuffer,
                           long[] pOriginInSrcImage,
                           long[] pRegionInSrcImage,
                           long pOffsetInDstBuffer,
                           boolean pBlockingCopy)
        Copies a nD region from this image into a nD region of same dimensions into a (OpenCl) buffer.
        Parameters:
        pDstBuffer - destination buffer
        pOriginInSrcImage - origin is source image
        pRegionInSrcImage - region dimensions in source image
        pOffsetInDstBuffer - offset in destination buffer in elements
        pBlockingCopy - true blocking call, false asynchronous call
      • copyTo

        public void copyTo​(ClearCLHostImageBuffer pClearCLHostImage,
                           boolean pBlockingCopy)
        Copies this buffer into a host image.
        Parameters:
        pClearCLHostImage - host image.
        pBlockingCopy - true blocking call, false asynchronous call
      • writeTo

        public void writeTo​(Buffer pBuffer,
                            boolean pBlockingRead)
        Writes a nD region of this image to a NIO buffer.
        Specified by:
        writeTo in interface ClearCLImageInterface
        Parameters:
        pBuffer - NIO buffer
        pBlockingRead - true blocking call, false asynchronous call
      • writeTo

        public void writeTo​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                            boolean pBlockingRead)
        Writes a this image to a CoreMem buffer.
        Specified by:
        writeTo in interface ClearCLImageInterface
        Parameters:
        pContiguousMemory - CoreMem buffer
        pBlockingRead - true blocking call, false asynchronous call
      • writeTo

        public void writeTo​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                            long[] pOrigin,
                            long[] pRegion,
                            boolean pBlockingRead)
        Writes a nD region of this image to a CoreMem buffer.
        Parameters:
        pContiguousMemory - CoreMem buffer
        pOrigin - origin in image
        pRegion - region dimensions in image
        pBlockingRead - true blocking call, false asynchronous call
      • writeTo

        public void writeTo​(Buffer pBuffer,
                            long[] pOrigin,
                            long[] pRegion,
                            boolean pBlockingRead)
        Writes a nD region of this image to a NIO buffer.
        Parameters:
        pBuffer - NIO buffer
        pOrigin - origin in image
        pRegion - region dimensions in image
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                             long[] pOrigin,
                             long[] pRegion,
                             boolean pBlockingRead)
        Reads from a CoreMem buffer into a nD region of this image.
        Parameters:
        pContiguousMemory - CoreMem buffer
        pOrigin - origin in image
        pRegion - region dimensions in image
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(net.haesleinhuepf.clij.coremem.ContiguousMemoryInterface pContiguousMemory,
                             boolean pBlockingRead)
        Reads from a CoreMem contiguous buffer into this image.
        Specified by:
        readFrom in interface ClearCLImageInterface
        Parameters:
        pContiguousMemory - CoreMem buffer
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(net.haesleinhuepf.clij.coremem.fragmented.FragmentedMemoryInterface pFragmentedMemory,
                             long[] pOrigin,
                             long[] pRegion,
                             boolean pBlockingRead)
        Reads from a CoreMem fragmented buffer into a nD region of this image. Each fragment corresponds to a single XY 2D plane (for XYZ 3D images) or a single X 1D line (for XY 2D images).
        Parameters:
        pFragmentedMemory - CoreMem fragmented buffer
        pOrigin - origin in image
        pRegion - region dimensions in image
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(net.haesleinhuepf.clij.coremem.fragmented.FragmentedMemoryInterface pFragmentedMemory,
                             boolean pBlockingRead)
        Reads from a CoreMem fragmented buffer into this image.
        Parameters:
        pFragmentedMemory - CoreMem fragmented buffer
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(Buffer pBuffer,
                             long[] pOrigin,
                             long[] pRegion,
                             boolean pBlockingRead)
        Reads from a NIO buffer into a nD region of this image.
        Parameters:
        pBuffer - NIO buffer
        pOrigin - origin in image
        pRegion - region dimensions in image
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public void readFrom​(Buffer pBuffer,
                             boolean pBlockingRead)
        Reads from a NIO buffer into this image.
        Specified by:
        readFrom in interface ClearCLImageInterface
        Parameters:
        pBuffer - NIO buffer
        pBlockingRead - true blocking call, false asynchronous call
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(byte[] pByteArray,
                                                                             boolean pBlockingRead)
        Reads from a Java byte array into this image.
        Parameters:
        pByteArray - byte array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(char[] pCharArray,
                                                                             boolean pBlockingRead)
        Reads from a Java char array into this image.
        Parameters:
        pCharArray - char array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(short[] pShortsArray,
                                                                             boolean pBlockingRead)
        Reads from a Java short array into this image.
        Parameters:
        pShortsArray - short array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(int[] pIntArray,
                                                                             boolean pBlockingRead)
        Reads from a Java int array into this image.
        Parameters:
        pIntArray - int array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(long[] pLongArray,
                                                                             boolean pBlockingRead)
        Reads from a Java long array into this image.
        Parameters:
        pLongArray - long array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(float[] pFloatArray,
                                                                             boolean pBlockingRead)
        Reads from a Java float array into this image.
        Parameters:
        pFloatArray - float array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • readFrom

        public net.haesleinhuepf.clij.coremem.offheap.OffHeapMemory readFrom​(double[] pDoubleArray,
                                                                             boolean pBlockingRead)
        Reads from a Java double array into this image.
        Parameters:
        pDoubleArray - double array
        pBlockingRead - true blocking call, false asynchronous call
        Returns:
        temp offheap memory object used to transfer the data.
      • getImageType

        public ImageType getImageType()
        Returns image type
        Returns:
        image type
      • getChannelOrder

        public ImageChannelOrder getChannelOrder()
        Returns image type
        Returns:
        image type
      • getChannelDataType

        public ImageChannelDataType getChannelDataType()
        Returns image channel type
        Returns:
        channel type
      • isNormalized

        public boolean isNormalized()
        Returns whether this image is normalized (values between 0 and 1)
        Returns:
        true if normalized, false otherwise
      • isSigned

        public boolean isSigned()
        Returns whether this image data type has a sign
        Returns:
        true if signed, false otherwise
      • isInteger

        public boolean isInteger()
        Returns whether this image data type is integer
        Returns:
        true if integer, false otherwise
      • isFloat

        public boolean isFloat()
        Returns whether this image data type is float
        Returns:
        true if float, false otherwise
      • getSizeInBytes

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