Sat Jul 04, 2015 2:29 pm
typedef float OutputPixelType;
typedef itk::Image< OutputPixelType, 2 > OutputImageType;
typedef itk::ForwardFFTImageFilter< OutputImageType > FFTType;
typedef FFTType::OutputImageType ComplexImageType;
ComplexImageType::Pointer ClassType::computeFFT(OutputImageType::Pointer image,int padXSize,int padYSize)
{
OutputImageType::SizeType regionSize =getImageSize(image);
typedef itk::WrapPadImageFilter< OutputImageType, OutputImageType > PadFilterType;
PadFilterType::Pointer padFilter = PadFilterType::New();
padFilter->SetInput( image );
PadFilterType::SizeType padding;
// Input size is [48, 62, 42]. Pad to [48, 64, 48].
padding[0] = padXSize- regionSize[0];
padding[1] = padYSize- regionSize[1];
padFilter->SetPadUpperBound( padding );
FFTType::Pointer forwardFFTFilter = FFTType::New();
forwardFFTFilter->SetInput( padFilter->GetOutput() );
forwardFFTFilter->Update();
ComplexImageType::Pointer complexImage= forwardFFTFilter->GetOutput() ;
return complexImage;
}
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com
Powered by phpBB © phpBB Group.