Re: [vmtk-users] centerlines question
Brought to you by:
davidsteinman,
lucantiga
From: Luca A. <an...@ma...> - 2007-01-23 15:26:33
|
Hey Joong-Ho, nice model. As a further suggestion, you could use a larger curvature weight on the aorta (while the branches look good), in order to get rid of the surface wobbles. For visualizing maximal inscribed spheres, the quick and dirty way I use is using glyphs. You can do it in Paraview (www.paraview.org), or by running something like import vtk reader = vtk.vtkXMLPolyDataReader() reader.SetFileName("foo_centerlines.vtp") reader.Update() reader.GetOutput().GetPointData().SetActiveScalars ("MaximumInscribedSphereRadius") sphere = vtk.vtkSphereSource() sphere.SetThetaResolution(12) sphere.SetPhiResolution(12) glyphs = vtk.vtkGlyph3D() glyphs.SetInput(reader.GetOutput()) glyphs.SetSource(sphere.GetOutput()) glyphs.ScalingOn() glyphs.SetScaleModeToScaleByScalar() glyphs.SetScaleFactor(2.0) writer = vtk.vtkXMLPolyDataWriter() writer.SetInput(glyphs.GetOutput()) writer.SetFileName("foo_glyphs.vtp") writer.Write() Also, in the model I see that the model is artifactually narrowed at a curve along the celiac. This is probably due to the initialization not filling the vessel completely. When this happens, you either resegment the missing bit, or rerun the levelsets for the celiac giving it a small but nonzero (say, 0.01 or 0.1) propagation weight. As to the single centerline representing the branch, you're right, it would be handy to have one. Except that single centerlines wouldn't naturally meet at bifurcations (but if I understand it properly, this wouldn't necessarily be an issue). Let me look into it, I may be able to code this tonight and let you know tomorrow Luca -- Luca Antiga, PhD Biomedical Technologies Laboratory, Bioengineering Department, Mario Negri Institute email: an...@ma... web: http://villacamozzi.marionegri.it/~luca mail: Villa Camozzi, 24020, Ranica (BG), Italy phone: +39 035 4535-381 On Jan 22, 2007, at 10:59 PM, Joong-Ho Won wrote: > Hi Luca, > > Thanks again. I understood how it works. So even with a simple Y- > shaped branches, I should have 4 cells even though there are 3 groups. > > What I am trying to get is to have a unique and robust descriptor > for each group, so that I can play with only one centerline in > processing individual branch. > > I attach a .tgz file for those (failed) files :) > > BTW, is it possible to visualize tube surfaces bases on the > centerlines and the maximum inscribing sphere radii? That should be > a form is distance surface. I would like to see how closely it > approximate the original surface obtained by levelsets and marching > cubes. > > I really appreciate your responsiveness. > > Best, > > Joong-Ho. > > > Luca Antiga wrote: >> Hi Jong-Ho, >> glad you're being successful with your analysis. >> First a suggestion: if you need to spit out your data in a CSV- >> like format, you can use the pointdata format. You can do it by >> naming your output file with a .dat extension. >> As to centerlines and branches, you're right, in general there's >> more than one cell per branch. If you look at the pictures of the >> branch splitting tutorial (http://villacamozzi.marionegri.it/~luca/ >> vmtk/doku.php?id=vmtk:vmtk_tutorials:branch_splitting) you can >> figure out why: each vmtk centerline is defined from an inlet to >> an outlet. If you have a single bifurcation, the upstream branch >> will be defined by both cells corresponding to the two >> centerlines, while the downstream branches will be made up by one >> cell each. The two cells of the upstream branch are mostly >> coincident, except in the bifurcation region. How early and how >> much they depart depends on the shape of the bifurcation region. >> This is a feature that's very useful in handling complex branching >> situations, and it's the basis of geometric analysis of >> bifurcations. However, I also understand that one may want to have >> a unique definition... let me know what you have to do with your >> coordinates, I can maybe help out. >> Anyway, in order to find out which cells belong to which branch, >> you can use the GroupIds array (refer to the tutorial for an >> explanation). >> If you need to extract points at the same abscissa at every cell >> of a branch, run centerlines through vmtkcenterlineattributes, >> which will compute abscissas along centerlines. If you run it >> before splitting and then split branches, abscissas will start at >> zero at the inlets, and then progress along every branch. If you >> run it after splitting, every branch will start at zero. Once you >> have the abscissas, every cell with the same group id will have >> correspondent points at the same abscissas (Now that I think about >> it, vmtk should have a filter that uses this criterion to generate >> a "one cell per branch" version of centerlines). >> Let me know what's your purpose, so I can be more specific. >> A last point: for some reason your vtp attachments are embedded in >> messages and I can't save them properly. Could you please first >> zip them and then attach? >> Cheers >> Luca >> <centerlines.tgz> |