Rank: 123 based on 595 downloads (last 30 days) and 16 files submitted
photo

Sven

E-mail
Company/University
University of Michigan

Personal Profile:

Aussie living in the US. Engineering with MATLAB.

Some Interests:
-3D Volume Processing (CT, mri)
-Finite Element Analysis (human body simulation)
-Geometry Analysis (human body morphomics)


 

Watch this Author's files

 

Files Posted by Sven View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
05 Sep 2014 Screenshot octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven stl, space, volume, quadtree, octree, tree 79 20
  • 4.875
4.9 | 8 ratings
24 Jun 2014 Screenshot splitFV - split a mesh Splits a 2D or 3D mesh defined by faces and vertices into separately connected mesh pieces. Author: Sven mesh, separate, split, stl, faces, vertices 16 4
  • 5.0
5.0 | 4 ratings
01 May 2014 Screenshot interpmask - interpolate (tween) logical masks interpmask interpolates (or tweens) masks to transition smoothly between shapes in masks Author: Sven mask, interp1, interpolation, distance, tween, inbetween 4 0
01 May 2014 Screenshot mpoly2mask - converts multiple polygons to a mask Converts an object with multiple boundary contours to a logical mask Author: Sven poly2mask, bwboundaries, polygon, multiple, mask, logical 20 1
  • 5.0
5.0 | 1 rating
07 Mar 2014 Screenshot dbarray - pack and unpack database arrays to matlab arrays dbarray lets you directly send/fetch array[] type database fields into native MATLAB variables Author: Sven database, array, multidimensional, connection 12 0
Comments and Ratings by Sven View all
Updated File Comments Rating
30 Oct 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven

Hi Jonathan,

I haven't implemented specifically a nearest neighbour routine. You could use OcTree to find which bin your query location belongs to, and then find the nearest neighbour within that bin. This will be faster than querying all points in a large point cloud, however this alone won't guarantee correctness (since a point in an adjacent bin may be closer) unless the distance to the found nearest neighbour is less than the distance from your query point to any edges of its bin.

Did that help you out? If your point cloud isn't massive (or even if it is), John D'Errico's ipdm is pretty efficient, and there are some nearest neighbour kdtree implementations that may be helpful too.

30 Sep 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven

Hi Christophe, for your second question, you can force the decomposition to go to a specific level with the optional parameters:
OT = OcTree(pts,'binCapacity',inf,'maxDepth',3,'maxSize',0);

The OT will still contain the higher levels above that, but you can easily get only the desired level bins with a mask such as:
OT.BinDepths==2

For the neighbours that's an interesting question. It will be easy to find the 3 "siblings" of a given bin (they will be the same level and have the same parent bin No. as that bin). It might need a bit more work to find all neighbours... what exactly would you define as a neighbour? Can only "leaf-node" bins be neighbours or do you include any level's bin that shares a face with your target a neighbour?

05 Sep 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven

@Jing: Yep, thanks for finding that bug. Fixed now.

05 Sep 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven

@Wu Jun: It's strange but QuadTree decomposition in images is a different beast to QuadTree decomposition of 2d points, but they both have the same name. I'm afraid it's the same situation for OcTree decomposition (of image volumes vs 3d points). OcTree.m is targeted at points rather than image volume data.

05 Sep 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven

@Greg: (sorry for the late reply) This is best done *after* plotting the bins. You can just find which bins don't contain a point and then delete or deactivate that bin's plot handle:

% Run example 1 and then:
binHasPts = ismember(1:OT.BinCount, OT.PointBins)
set(boxH(~binHasPts),'Visible','off')

Comments and Ratings on Sven 's Files View all
Updated File Comment by Comments Rating
02 Dec 2014 inpolyhedron - are points inside a triangulated volume? Test if 3d points are inside a mesh. Or, voxelise a mask from a surface. Mesh can be non-convex too! Author: Sven Marc Lalancette

Amazing performance, great to have the grid input option. Sad about meshgrid (Y,X,Z) instead of ndgrid (X,Y,Z) type output though, can't simply convert to list doing IN(:).
Sept 2013 update indicates normals should point in, but help still says out...

30 Nov 2014 surf2solid - make a solid volume from a surface for 3D printing Turns thin surfaces into closed solids by adding a flat base or offsetting by a given thickness. Author: Sven Evan

Hi, a question when trying to figure out a solid with holes inside. For example, the "meshgrid" creates a 5*5 matrix, but I only need to use the central ring area to create solid ring-cylinder. I tried to set the thickness of those pixels(unwanted) to 0, but it still carried out a flat plan covering the whole 5*5 area (I expect no solid in the center hole). How could I set it? Thanks so much.

31 Oct 2014 inpolyhedron - are points inside a triangulated volume? Test if 3d points are inside a mesh. Or, voxelise a mask from a surface. Mesh can be non-convex too! Author: Sven Peter Morovic

Thanks for sharing, Sven - works great indeed.

31 Oct 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven Peter Morovic

Nice work, thanks for sharing!

30 Oct 2014 octree - partitioning 3D points into spatial subvolumes OcTree recursively splits a large set of points into smaller subvolumes. A QuadTree but in 3D. Author: Sven Sven

Hi Jonathan,

I haven't implemented specifically a nearest neighbour routine. You could use OcTree to find which bin your query location belongs to, and then find the nearest neighbour within that bin. This will be faster than querying all points in a large point cloud, however this alone won't guarantee correctness (since a point in an adjacent bin may be closer) unless the distance to the found nearest neighbour is less than the distance from your query point to any edges of its bin.

Did that help you out? If your point cloud isn't massive (or even if it is), John D'Errico's ipdm is pretty efficient, and there are some nearest neighbour kdtree implementations that may be helpful too.

Contact us