Hello I would like to take 3d medical image and calculate the mean and standard deviation of each voxel’s neighberhood - so I would like a kernel that operates on a cube of data that is centered on each voxel in image, can I use cudnn to achieve this ? The pseudocode would look sth like below:
I - 900x900x900 // image data dim- convDim = 5 // the size of convolution filter is sth I will set by trial and error __global__ getLocalDat (data = I(xa:xb, ya:yb, za:zb) )-> [mean,std] // kernel taking a cube of data around each voxel where xa-xb= ya-yb=za-zb = dim and return vector with mean and standard deviation of neighberhood flattened = flatten(data) // getting all data from a cube in convolution filter return [mean(flattened), std(flattened) ] }
Of course I omitted all memory allocations, resolving bank conflicts as we need to access the same data for multiple kernels at once , uploading data to shared memory of block … as I honestly suppose that those tasks are already implemented as this is common problem for all convolutions am I right?
I would be very grateful for any help with this problem