Re: [MayaVi-users] Misunderstanding
Status: Beta
Brought to you by:
prabhu_r
From: Prabhu R. <pra...@us...> - 2004-10-18 12:46:20
|
>>>>> "MK" == Matthew Knepley <kn...@mc...> writes: [...] MK> 3) Try to choose the PolyData Module, but it complains that MK> it does not handle UnstructuredGrid MK> I thought the Filter would change the rep to PolyData, but MK> that is not happening somehow. I also misunderstand the "Show MK> Pipeline" command because I cannot understand the output. Any MK> suggestions here? MK> I would be glad to send the new module or mesh if you MK> want. Your understanding of the pipeline is perfectly ok. I just wrote some bad code in the PolyData module. :( The PolyData module was meant to visualize data that originated from a file containing polydata. An unnecessary restriction since filters can change the data type. I'll fix this in CVS shortly. However, I recommend that you use the SurfaceMap module instead of PolyData in general. SurfaceMap will work with any dataset and is generally more used (and therefore better tested). Using the SurfaceMap you can view your data right now (no need to wait for anon-CVS from SourceForge etc.). Also note that you really don't need to write a new filter if its a trivial one. Simply use the UserDefined filter and enter the VTK filter name. Or from the command line like so: $ mayavi -d vtkbin.vtk -f UserDefined:vtkExtractEdges -m SurfaceMap You might also want to try the vtkFeatureEdges filter like so: $ mayavi -d vtkbin.vtk -f PolyDataNormals -f \ UserDefined:vtkFeatureEdges -m SurfaceMap vtkFeatureEdges expects polydata so I add a PolyDataNormals filter upstream. If you look at Filters/PolyDataNormals.py you'll see that I do some magic in the _set_input method to make sure that the data is converted to polydata before processing. cheers, prabhu |