[vtkusers] 3D image convolution with Kernel 20x20x20

David Gobbi david.gobbi at gmail.com
Mon Apr 2 15:49:00 EDT 2012


On Mon, Apr 2, 2012 at 1:36 PM, Martin Dulovits
<martin.dulovits at woogieworks.at> wrote:
> On 4/2/2012 9:32 PM, David Gobbi wrote:
>
> On Mon, Apr 2, 2012 at 1:12 PM, Martin Dulovits
> <martin.dulovits at woogieworks.at> wrote:
>
> On 4/2/2012 8:56 PM, David Gobbi wrote:
>
> Hi Martin,
>
> I think the 7x7x7 restriction is still in place.  Would it be possible
> for you to use vtkSeparableConvolution instead?  It has no restriction
> on its kernel size.
>
> You can also look at vtkImageCorrelation.
>
> Its the dosimetric distribution of a radiation source. Its symetric, even
> circular symmetric, but does this mean it is seperable ?
> Is this 7x7x7 constraint also in ITK ?
>
> The 7x7x7 constraint is only in that one VTK class.
>
> Circular symmetry is separable for a Gaussian kernel, but not for other
> kernels.
>
>  - David
>
>
> Thats was what I remembered from my math courses, but I wasnt sure any more
> ..
> I guess then I will try to work in in fourier with vtk or scipy ..
> Do you know is there some sample code for convolution with fft in vtk to
> build upon ?

In VTK you would have to use the FFT filters directly, there are FFT
filters but there isn't a specific FFT convolution filter.

So you would FFT both images, then pad the kernel FFT image to be the
same size as the main FFT image, multiply them together, and then
inverse FFT.  One issue you might run into is that the
vtkImageMathematics class cannot do complex arithmetic.

 - David



More information about the vtkusers mailing list