[vtkusers] Highpass filter

Michael Baltaxe mbaltaxe at hotmail.com
Tue Apr 11 21:07:10 EDT 2006


Hi,

I am trying to apply a highpass filter to an input image but I haven’t been 
able to work it out. Here is my code:

vtkImageButterworthHighPass *highpass;
highpass = vtkImageButterworthHighPass::New();
vtkImageFFT *fft;
fft = vtkImageFFT::New();
vtkImageRFFT *rfft;
rfft = vtkImageRFFT::New();

fft->SetInput(image);
highpass ->SetInput(fft->GetOutput());
highpass ->SetXCutOff(0.03);
highpass ->SetYCutOff(0.03);
highpass ->ReleaseDataFlagOff();
rfft->SetInput(highpass ->GetOutput());

vtkImageExtractComponents *real;
real = vtkImageExtractComponents::New();
real->SetInput(rfft->GetOutput());
real->SetComponents(0);

vtkImageViewer *view2;
view2 = vtkImageViewer::New();
vtkRenderWindow *renWin;
renWin = vtkRenderWindow::New();
view2->SetInput(real->GetOutput());
view2->SetColorWindow(255);
view2->SetColorLevel(127.5);
renWin->AddRenderer(view2->GetRenderer());
renWin->Render();

I obtain an image only in the center and a white region in the rest of the 
space. The center image is also far from the expected.

I would appreciate any help in this matter.

Michael.





More information about the vtkusers mailing list