I don't know how to start the project to implement this:
- An matrix of 16 bits integers are loaded into GPU memory (This is a grey scale radiology image)
- A second matrix of 16 bits of integers is computed from the first array by applying a function (For example a contrast enhancement algorithm)
- An region of interest of the second matrix is converted to an RGB image for on screen display.
I can do step one and two and I'm stuck on step 3! I've implemented all that in CPU, so this is not a matter of handling grey scale or RGB images, nor creating bitmaps for display. I've also implemented the first two steps in OpenCL and then read the resulting matrix in CPU memory for RGB bitmap conversion and then display it. But this is of course slow because of moving data back and forth between CPU and GPU memory (Images are really big: more than 100 megapixel).
Any help is appreciated. I'm programming with Delphi 10 but sample code in C/C++ is OK. I have VC2010 and successfully rebuild NVidia OpenCL oclNbody sample application.