Hi Ben,
 essentially, the InsideOut true setting of the branches means "clip the 
selected branches off" producing a simply connected model.

I always used it to chop a single vessel off, but now that I tested more than 
one branch, the behavior is indeed a bit weird and it needs to be fixed for 1.0.
I'll add it to the to do list.

What happens with more than one branch id is that it produces one connected 
surface per branch id, from which that branch is
clipped off, and stores them in the same vtkPolyData. So it only *looks* like 
it doesn't clip any branches, but the visual result is just a superposition
of models, all existing in the same vtkPolyData, each of which has been clipped 
a different branch (not that useful). You can verify it by 
running vmtksurfaceconnectivity on the output of vmtkbranchclipper, it will 
extract the largest of these models, and it will have a clipped branch.

There's a couple of things you can do before the issue is fixed, though: 

A. you can chain branch clippers, and specify a different branch id for each;

B. you can use vmtkcenterlinelabeler to relable group ids before clipping, 
turning the multiple group ids into the same groupid. This is how's done
in a pipe:

vmtksurfacereader -ifile foo.vtp --pipe vmtkcenterlines -seedselector 
openprofiles --pipe vmtkbranchextractor --pipe vmtkcenterlinelabeler 
-labelidsarray GroupIds -labeling 0 0 1 1 2 0 3 3 --pipe vmtkbranchclipper 
-groupids 0 -insideout 1 -ofile foo_clipped.vtp

Basically, the labeling option is a mapping between all input GroupIds and the 
target GroupIds, expressed as "from1 to1 from2 to2 ...". In the example above, 
there are 3 group ids in total, and the groupid  2 is remapped to 0. At this 
point the groupid 0 is clipped off the model.

Hope this helps.

Best regards


Luca



On Feb 13, 2012, at 9:23 PM, Berkowitz, Benjamin M wrote:

> To clarify:  the problem is that it doesn't clip any branches when the 
> InsideOut parameter is true and more than one branch is selected.  The 
> problem doesn't occur when InsideOut is false or only one branch is selected.
> 
> Thanks,
> Ben Berkowitz
> 
> 
> From: Berkowitz, Benjamin M [benjamin-berkow...@uiowa.edu]
> Sent: Monday, February 13, 2012 10:39 AM
> To: vmtk-users@lists.sourceforge.net
> Subject: [vmtk-users] vmtkCenterlineClipper
> 
>     I've been using vmtkCenterlineClipper in interactive mode, and it works 
> fine for clipping one branch.  I haven't been able to get it to clip more 
> than one branch, though.  I take input from vmtkBranchExtractor like the 
> branch tutorial.  Here is that portion of my script:
> 
>     centerlines = vmtkscripts.vmtkCenterlines()
>     centerlines.Surface = aneurysmVesselSurface
>     centerlines.Execute()
> 
>     branchExtractor = vmtkscripts.vmtkBranchExtractor()
>     branchExtractor.GroupIdsArrayName = 'CenterlineGroupID'
>     branchExtractor.RadiusArrayName = 'MaximumInscribedSphereRadius'
>     branchExtractor.BlankingArrayName = 'Blanking'
>     branchExtractor.Centerlines = centerlines.Centerlines
>     branchExtractor.Execute()
> 
>     clippingCenterlines = branchExtractor.Centerlines
>     branchClipper = vmtkscripts.vmtkBranchClipper()
>     branchClipper.Centerlines = clippingCenterlines
>     branchClipper.Interactive = 1
>     branchClipper.GroupIdsArrayName = 'CenterlineGroupID'
>     branchClipper.RadiusArrayName = 'MaximumInscribedSphereRadius'
>     branchClipper.BlankingArrayName = 'Blanking'
>     branchClipper.Surface = aneurysmVesselSurface
>     branchClipper.InsideOut = 1
>     branchClipper.Execute()
>     
>     aneurysmVesselSurface = branchClipper.Surface
>     clippingCenterlines = branchClipper.Centerlines
>     
>     clippedViewer = vmtkscripts.vmtkSurfaceViewer()
>     clippedViewer.Surface = aneurysmVesselSurface
>     clippedViewer.Execute()
> 
> 
> Thanks,
> Ben Berkowitz
> ------------------------------------------------------------------------------
> Try before you buy = See our experts in action!
> The most comprehensive online learning library for Microsoft developers
> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
> Metro Style Apps, more. Free future releases when you subscribe now!
> http://p.sf.net/sfu/learndevnow-dev2_______________________________________________
> vmtk-users mailing list
> vmtk-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/vmtk-users

------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to