[Insight-users] ITK4 and GPU with OpenCL. How to compile?

Luis Ibanez luis.ibanez at kitware.com
Sat May 21 15:21:08 EDT 2011


Hi Denis,

Please find instruction here:

http://www.itk.org/Wiki/ITK_Release_4/GPU_Acceleration

In particular:
http://www.itk.org/Wiki/ITK_Release_4/GPU_Acceleration#Instructions_for_Installing_OpenCL

Let us know if you find any problems.


       Thanks


              Luis


--------------------------------
On Tue, May 17, 2011 at 9:42 AM, Denis Shamonin <dshamoni at gmail.com> wrote:
> Dear All,
>
> We are very interested to try the current  ITK4 GPU implementation with OpenCL.
> But unfortunately the CMake files ITK4\Modules\GPU are not finished
> and have status To Be Done ( itk-module-TBD.cmake )
> After spending some time to compile and fixing Cmake files for this
> module. I've decided to ask here.
>
> Could you point me to exact steps I have to follow to add
> ITK-GPUCommon module? So, That I could start playing.
> I've almost made it with some hacks all around.
> Does anyone have working solution to share with tests included? That
> would be great.
>
> BTW: I've spotted error in GPUMeanImageFilter.cl
>
>    for(int z = max(0, (int)(giz-radiusz)); z <= min((int)(depth-1),
> (int)giz+radiusz)); z++)  line : 81 <- wrong
>    for(int z = max(0, (int)(giz-radiusz)); z <= min((int)(depth-1),
> (int)(giz+radiusz)); z++) line : 81 <- correct
>
> Thank you,
> -Denis
>
> -------------------------------------------------------------------------------------------------------------------------------------------
> My current CMakeList.txt for this module look like this:
>
> project(ITK-GPUCommon)
>
> IF (ITK_USE_GPU)
>        FIND_PACKAGE( OpenCL REQUIRED )
>
>  FILE(GLOB itkGPUSRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/src *.cl)
>  FILE(GLOB itkGPUHDR RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include *.h)
>  FILE(GLOB itkTxxSRC  RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/include *.txx)
>
>  SOURCE_GROUP("OpenCL Source Files" FILES ${itkGPUSRC})
>
>  FILE(COPY ${itkGPUSRC} DESTINATION ${ITK_BINARY_DIR}/GPU/Common)
>  MESSAGE( "OpenCL files to copy " ${itkGPUSRC} )
>
>        INCLUDE_DIRECTORIES(
>        ${OPENCL_INCLUDE_DIRS}
>        )
>
> ENDIF(ITK_USE_GPU)
>
> set(ITK-GPUCommon_LIBRARIES ITK-GPUCommon)
> configure_file(src/pathToOpenCLSourceCode.h.in pathToOpenCLSourceCode.h)
>
> itk_module_impl()
>
> #install(FILES
> #  pathToOpenCLSourceCode.h
> #  DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}
> #  )
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.html
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-users
>


More information about the Insight-users mailing list