[Insight-users] Problem with VnlFFTRealToComplexConjugateImageFilter

Gaëtan Lehmann gaetan.lehmann at jouy.inra.fr
Fri Feb 26 06:37:01 EST 2010


Le 26 févr. 10 à 08:47, 闻铮 a écrit :

>
> Error:
>
> itk::ExceptionObject (00ACF814)
> Location: "void __thiscall  
> itk::VnlFFTRealToComplexConjugateImageFilter<float,2>
> ::GenerateData(void)"
> File: c:\program files\insighttoolkit-3.16.0\code\algorithms 
> \itkVnlFFTRealToComp
> lexConjugateImageFilter.txx
> Line: 94
> Description: Illegal Array DIM for FFT
>
>
> I use this filter to transform a picture into frequency domain and  
> do modification there. The input file is a jpg file, and the above  
> error happened during execution.
>
>   for(i = 0; i < num_dims; i++)
>     {
>     //#if 0
>     if( !this->Legaldim(inputSize[i]) )   
> <--------------------------- -------------this is where the error  
> happened.
>       {
>       ExceptionObject exception(__FILE__, __LINE__);
>       exception.SetDescription("Illegal Array DIM for FFT");
>       exception.SetLocation(ITK_LOCATION);
>       throw exception;
>       }
>     //#endif
>     vec_size *= inputSize[i];
>     }
>
>
> this->Legaldim(inputSize[0]) is 0 where inputSize[0] is 290.
>
> My guess is I cannot simply use a jpg picture as input?
>

Hi,

You have to pad your image to make its size a power of two on all the  
dimensions.
Another option is to use FFTW, which does not have this limitation.

Regards,

Gaëtan


-- 
Gaëtan Lehmann
Biologie du Développement et de la Reproduction
INRA de Jouy-en-Josas (France)
tel: +33 1 34 65 29 66    fax: 01 34 65 29 09
http://voxel.jouy.inra.fr  http://www.itk.org
http://www.mandriva.org  http://www.bepo.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 203 bytes
Desc: Ceci est une signature ?lectronique PGP
URL: <http://www.itk.org/pipermail/insight-users/attachments/20100226/344b18d5/attachment-0001.pgp>


More information about the Insight-users mailing list