[vtkusers] Re: [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
Sat Mar 18 02:59:43 EST 2006


Hi all
 I didn't find that filter (ITKmeshToVTKPolyData), so i tried to use the MeshToUnstructuredGrid(floatMesh* mesh) method i found in InsightApplications/Auxiliary/vtk/vtk2itk.cxx file.
 the problem is that the surface extraction filter produces a MeshSource, although the MeshToUnstructuredGrid(..) method takes Mesh.
 so how can i convert from Meshsource to Mesh, or what should i pass to that method?
 thx for help
 
Karthik Krishnan <Karthik.Krishnan at kitware.com> a écrit : 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( 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.
>
>------------------------------------------------------------------------
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk.org
>http://www.itk.org/mailman/listinfo/insight-users
>  
>


		
---------------------------------
 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://www.vtk.org/pipermail/vtkusers/attachments/20060318/b16e290a/attachment.htm>


More information about the vtkusers mailing list