[vtkusers] please help on visualization during each iteration.
Dongqing Chen
dqchen at cvip.louisville.edu
Mon Jan 29 17:06:18 EST 2007
Dear All:
I need to visualize the intermediate result during any two consective iterations. I just wrote a member fuction, and called it during iterations. But I could not get the results displayed on the moniter. The program did not generate any error, and the codes inside the member function were copied from some parts in the same program. That part worked well for the final result visualization.
Thanks a lot for any kind help.
/*-------------------------------------------------------------------*/
void FrontDialog::NewObjectShow(vtkPolyData* PolyData)
/*-------------------------------------------------------------------*/
{
//Smooth the volume
smooth = vtkWindowedSincPolyDataFilter::New();
smooth->SetInput(PolyData);
smooth->SetNumberOfIterations(m_SmoothIterations);
smooth->BoundarySmoothingOn();
smooth->SetFeatureAngle(120);
smooth->SetEdgeAngle(90);
smooth->SetPassBand(0.01);
DeformMapper = vtkPolyDataMapper::New();
DeformMapper->SetInput (smooth->GetOutput());
DeformMapper->ScalarVisibilityOn();
DeformActor = vtkActor::New();
DeformActor->SetMapper(DeformMapper);
//--------------
// Adjust Light
//--------------
iren->LightFollowCameraOff();
ren3->LightFollowCameraOn();
lightKit = vtkLightKit::New();
lightKit->AddLightsToRenderer(ren3);
//-------------
// Add Renderer
//-------------
ren3->AddActor(DeformActor);
ren3->SetBackground(1,1,1);
// Set Stereo Mode
//---------------------------
renWin->AddRenderer(ren3);
iren->SetRenderWindow(renWin);
renWin->Start(); // Initialize the vtk widget and generate the Qt Widget
renWin->SetSize(800-5,600-5); // Must be Called after Start() and before Render()
renWin->Render();
vtkQtWindow = vtkQtObjectFactory::QtWidget(renWin);
vtkQtWindow->show();
// Update the GUI
slider_sag->setEnabled(true);
slider_axi->setEnabled(true);
slider_cor->setEnabled(true);
}
Best Wishes,
-----------------------------------------------------------------
Dongqing Chen
Ph.D Research Assistant
Rm. 07, Paul C. Lutz Hall
Computer Vision & Image Processing (CVIP) Lab
Department of Electrical & Computer Engineering
Speed School of Engineering
University of Louisville
Louisville, KY. 40292
U.S.A
Email: dqchen at cvip.louisville.edu
Phone:+1-502-852-2789 (Lab)
+1-502-852-6130 (Office)
-----------------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070129/e730020e/attachment.htm>
More information about the vtkusers
mailing list