Skip to content

RTKConsortium/ITKCudaCommon

Repository files navigation

ITKCudaCommon

GitHub release PyPI Wheels License

Overview

ITKCudaCommon is an ITK module for processing images with Cuda, including the itk::CudaImage class and base classes for processing objects of this type, itk::CudaImageToImageFilter and itk::CudaInPlaceImageFilter. ITKCudaCommon was originally based on the GPUCommon module for OpenCL.

What is a CudaImage?

An itk::CudaImage is an itk::Image (by inheritance) with a new member, m_DataManager of type itk::CudaDataManager. The role of this member is to manage a GPU memory buffer with the same size as the itk::Image::m_Buffer. Data is transferred from one buffer to the other (m_GPUBuffer and m_CPUBuffer) only when necessary, i.e., when accessing one of the two buffers and the other has been accessed more recently and therefore marked as "dirty" (using the members m_IsGPUBufferDirty and m_IsCPUBufferDirty).

The Python CudaImage wrapping exposes a __cuda_array_interface__ for zero-copy views to other packages such as PyTorch or CuPy. See the CUDA array interface documentation for more information.

What is a CudaImageToImageFilter?

An itk::CudaImageToImageFilter and its in place child, itk::CudaInPlaceImageFilter, are ITK filters which can be integrated in an ITK pipeline to process an itk::CudaImage. They are CUDA equivalent to the CPU classes itk::ImageToImageFilter and itk::InPlaceImageFilter in ITK's Common module. See the ITK software guide for more information. Their GPUGenerateData member function must process the output CudaImage objects.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 13