[vtkusers] recommended cell locator for IntersectWithLine tests?

Dean Inglis dean.inglis at camris.ca
Thu Dec 17 11:03:46 EST 2009


John,

thanks for the offer.  Hopefully you will get to this before I do,  but Ill 
take a look.

Dean

>Adding a routine to return all intersections along the line was always on 
>my to-do list for vtkModifiedBSPTree. I don't think I have >any spare time 
>right now, but it is actually quite simple to implement.
>
>The ray is intersected with spatial regions (tree nodes) and a stack of 
>bboxes is created with ray fragments associated with them, >when an 
>intersection is found, the intersection is terminated (providing no cells 
>remain in the current leaf node that could intersect >earlier). When the 
>termination criteria is met, the loop exits, the stack is left and the 
>intersection is returned.
>
>All one needs to do is - not terminate - simply add the intersection to a 
>list and keep going until the end of the stack walking is >complete. There 
>may be some jiggery-pokery required to get the correct ray fragment as I 
>can't remember if everything needed is on >the stack too.
>
>If I can't sleep one night soon, I'll implement it for you.
>
>JB



> -----Original Message-----
> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
> Of Dean Inglis
> Sent: 17 December 2009 02:48
> To: vtkusers archive
> Subject: Re: [vtkusers] recommended cell locator for IntersectWithLine
> tests?
>
> Hi David,
>
> thanks but the signature I am looking for (I just found out) is only
> implemented in
> vtkOBBTree.  I need all the points of intersection along the line.
> All the other child classes of vtkAbstractCellLocator just
> call the Superclass method in which case it just says:
>   vtkErrorMacro(<<"The locator class - " << this->GetClassName()
>     << " does not yet support this IntersectWithLine interface");
>
> Dean
>
> >I highly recommend the vtkModifiedBSPTree. It sped up my intersections
> >over the OBBTree about 40x. I didn't ever play with those kind of
> >settings so I can't recommend any, I just used the defaults and it
> >seemed to work fine for my application.
>
>
> > I am revisiting some old code I wrote to do stereology measurements
> > (mean intercept length).  I am rotating a set of evenly spaced parallel
> > test lines (in the x-y plane) and during each rotation I need to find 
> > all
> > the intersection points
> > of the lines with a set of perpendicular planes defined by a vtkPolyData
> > ( imagine the planes as being the walls of a maze ).  I was using
> > vtkOBBTree
> > with the following settings:
> >   this->OBBTree->CacheCellBoundsOff();
> >   this->OBBTree->AutomaticOff();
> >   this->OBBTree->SetMaxLevel( 100 );
> >   this->OBBTree->SetNumberOfCellsPerNode( 1 );
> >
> > but there are some cases wherein not all the interesection points are
> > found.
> > The number of "walls" in the "maze" are in the hundreds but less than a
> > thousand.
> > The walls do not necessarily form closed polygons.  Can anyone recommend
> > a more robust locator and if so with some suggested settings?
> >
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers 




More information about the vtkusers mailing list