[Insight-users] How to convert the result of a Surface extraction Filter(meshSource) to vtkUnstructuredGrid to visualize it?

Karthik Krishnan Karthik.Krishnan at kitware.com
Fri Mar 17 15:57:23 EST 2006


There is an ITKmeshToVTKPolyData filter in 
InsightApplications/Auxillary. If you search InsightApplications, I 
think there are a couple of applications that use the filter.

charfeddine amir wrote:

> 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 
> <http://us.rd.yahoo.com/messenger/mail_taglines/default/*http://fr.beta.messenger.yahoo.com> 
> la version beta.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>


More information about the Insight-users mailing list