[vtkusers] ImageGaussianSmooth
Jeong-Eun Kwon
jeongeunkwon at gmail.com
Wed Mar 23 09:22:06 EST 2005
I'd like to do ImageGaussianSmooth to the image in window and then
render it in window. but the result is in 2D shape, not 3D.
I made tiff file with the image which I did ImageGaussianSmooth and it
was ok. I don't know why I can't render it in window.
What's the problem with my code?
vtkTIFFWriter *writer = vtkTIFFWriter::New();
vtkWindowToImageFilter *pWindowToImage = vtkWindowToImageFilter::New();
pWindowToImage->SetInput(pRenWin);
vtkImageGaussianSmooth *pGaussianSmooth = vtkImageGaussianSmooth::New();
pGaussianSmooth->SetInput(pWindowToImage->GetOutput());
pWindowToImage->Modified();
writer->SetFileName("test.tiff");
writer->SetInput(pGaussianSmooth->GetOutput());
writer->Write();
vtkImageToPolyDataFilter *pImageToPolyData = vtkImageToPolyDataFilter::New();
pImageToPolyData->SetInput(pGaussianSmooth->GetOutput());
vtkPolyDataMapper *pMapper = vtkPolyDataMapper::New();
pMapper->SetInput(pImageToPolyData->GetOutput());
vtkActor *pActor = vtkActor::New();
pActor->SetMapper(pMapper);
pRenderer->RemoveAllProps();
pRenderer->AddActor(pActor);
My final goal is doing ImageGaussianSmooth to the part of the image in
window, not the whole image like that code. A point is given, then I'd
like to do ImageGaussianSmooth to just surrounding part of that point.
How can I do this?
Kind Regards,
Jeong-eun.
More information about the vtkusers
mailing list