diff --git a/README.md b/README.md index 65bdecc..6d3d34f 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # clij-opencl-kernels -This repository contains a collection of [OpenCL](https://www.khronos.org/opencl/) [kernels for generic image -processing](https://github.com/clij/clij-opencl-kernels/tree/master/src/main/java/net/haesleinhuepf/clij/kernels). +This repository contains a collection of [OpenCL](https://www.khronos.org/opencl/) kernels for [image +processing](https://github.com/clij/clij-opencl-kernels/tree/development/src/main/java/net/haesleinhuepf/clij/kernels). The [CLIJ](https://clij.github.io) is build on top of it allowing [ImageJ](https://imagej.nih.gov/ij/) / [Fiji](https://fiji.sc) users in doing GPU-accelerated image processing without the need for learning OpenCL. @@ -11,7 +11,7 @@ GPU-accelerated image processing without the need for learning OpenCL. Robert Haase, Loic Alain Royer, Peter Steinbach, Deborah Schmidt, Alexandr Dibrov, Uwe Schmidt, Martin Weigert, Nicola Maghelli, Pavel Tomancak, Florian Jug, Eugene W Myers. -*CLIJ: GPU-accelerated image processing for everyone*. BioRxiv preprint. [https://doi.org/10.1101/660704](https://doi.org/10.1101/660704) +*CLIJ: GPU-accelerated image processing for everyone*. [Nat Methods (2019) doi:10.1038/s41592-019-0650-1](https://doi.org/10.1038/s41592-019-0650-1) ## Why a custom OpenCL-dialect? @@ -20,10 +20,10 @@ Theoretically, one has to write OpenCL-kernels specifically for given input- and adding images of type `float` resulting in a `float` image and a kernel for adding image of type `uint8` resulting in an image of type `float`. Furthermore, OpenCL defines images and buffers. However, as both are arrays of pixel intensities in memory, we wanted to access them in a unified way. As this would result in a ridiculous large number of individual kernel implementations, we used -a dialect where placeholders such as `DTYPE_OUT` represent the pixel type of the output image. +a dialect where placeholders such as `IMAGE_src_PIXEL_TYPE` represent the pixel type of the output image. ## List of placeholders -The following list of placeholders are used at the moment: +The following list of placeholders are used at the moment. The name `imagename` must contain `src` or `dst` to differentiate `readonly` and `writeonly` images.
CONVERT_DTYPE_IN |
-+ | |||
CONVERT_DTYPE_OUT |
-||||
DTYPE_IMAGE_IN_2D |
--__read_only image2d_t -__global char* -__global uchar* -__global short* -__global ushort* -__global float* - |
-Two dimensional input image type definition | +Convert any number to a given type. | |
DTYPE_IMAGE_IN_3D |
+IMAGE_imagename_TYPE |
__read_only image3d_t -__global char* -__global uchar* -__global short* -__global ushort* -__global float* - |
-Three dimensional input image type definition | -|
DTYPE_IMAGE_OUT_2D |
-+__read_only image2d_t __write_only image2d_t -__global char* -__global uchar* -__global short* -__global ushort* -__global float* - |
-Two dimensional output image type definition | -||
DTYPE_IMAGE_OUT_3D |
-__write_only image3d_t __global char* __global uchar* @@ -94,55 +58,57 @@ __global short* __global ushort* __global float* |
-Three dimensional output image type definition | +Two dimensional input image type definition. | |
DTYPE_IN |
-+ | |||
DTYPE_OUT |
+Pixel type definition | |||
GET_IMAGE_DEPTH |
+GET_IMAGE_DEPTH(imagename) |
constant number | Image size in Z | |
GET_IMAGE_HEIGHT |
+GET_IMAGE_HEIGHT(imagename) |
constant number | Image size in Y | |
GET_IMAGE_WIDTH |
+GET_IMAGE_WIDTH(imagename) |
constant number | Image size in X | |
READ_IMAGE_2D |
+POS_imagename_TYPE |
+int2 int4 |
+Type of coordinate | +|
POS_imagename_INSTANCE(pos0,pos1,pos2,pos3) |
+int2(pos0, pos1) int4(pos0,pos1,pos2,pos3) |
+instantiate variable of coordinate | +||
READ_imagename_IMAGE |
-read_imageui -read_imagef +read_imageui (2d) +read_imagef (2d) read_buffer2dc read_buffer2duc read_buffer2di read_buffer2dui read_buffer2df - |
-Read pixel intensity from a given position | -||
READ_IMAGE_3D |
--read_imageui -read_imagef +read_imageui (3d) +read_imagef (3d) read_buffer3dc read_buffer3duc read_buffer3di @@ -152,23 +118,17 @@ float | |||
WRITE_IMAGE_2D |
+WRITE_imagename_IMAGE |
-write_imageui -write_imagef +write_imageui (2d) +write_imagef (2d) write_buffer2dc write_buffer2duc write_buffer2di write_buffer2dui write_buffer2df - |
-Write pixel intensity to a given position | -|
WRITE_IMAGE_3D |
--write_imageui -write_imagef +write_imageui (3d) +write_imagef (3d) write_buffer3dc write_buffer3duc write_buffer3di @@ -181,17 +141,5 @@ float |