[vtkusers] Highpass filter

Dominik Szczerba domi at vision.ee.ethz.ch
Wed Apr 12 03:15:17 EDT 2006


dont you need to Update()?
ds

Michael Baltaxe wrote:
> 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.
> 
> 
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers

-- 
Dominik Szczerba, Dr.
Computer Vision Lab CH-8092 Zurich
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list