[Insight-users] How to convert the result of a Surface extraction
Filter(meshSource) to vtkUnstructuredGrid to visualize it?
charfeddine amir
charfeddine_amir at yahoo.fr
Fri Mar 17 12:16:10 EST 2006
Hi all,
i use a surface extraction filter like the one in the ItkSoftwareGuide.pdf page 259,
and i want to visualize it with vtk,
so i tried to do so :
void
AppBase
::visualizevolume()
{
meshSource = MeshSourceType::New();
const OutputPixelType objectValue = static_cast<OutputPixelType>( 255 );
meshSource->SetObjectValue( objectValue );
meshSource->SetInput( m_OutputVolume );
connector = ConnectorType::New();
connector->SetInput( meshSource->GetOutput() );
vtkImageViewer * viewer = vtkImageViewer::New();
vtkRenderWindowInteractor * renderWindowInteractor = vtkRenderWindowInteractor::New();
viewer->SetupInteractor( renderWindowInteractor );
viewer->SetInput( connector->GetOutput() );
viewer->Render();
viewer->SetColorWindow( 255 );
viewer->SetColorLevel( 128 );
renderWindowInteractor->Start();
}
but at the red line, i should convert the meshSource to a vtkUnstructuredGrid (i think)
how can i do that?
I take a look in the file vtk2itk.cxx but it's too diffucult, how can i use it?
thx,
Regards
---------------------------------
Nouveau : téléphonez moins cher avec Yahoo! Messenger ! Découvez les tarifs exceptionnels pour appeler la France et l'international.Téléchargez la version beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://public.kitware.com/pipermail/insight-users/attachments/20060317/b467afa3/attachment.html
More information about the Insight-users
mailing list