[Insight-users] itk::octree

motes motes mort.motes at gmail.com
Sat Nov 28 12:25:39 EST 2009


On Sat, Nov 28, 2009 at 5:47 PM, David Doria <daviddoria+itk at gmail.com> wrote:
> On Sat, Nov 28, 2009 at 11:42 AM, motes motes <mort.motes at gmail.com> wrote:
>>
>> I am looking at itkOctreeTest.cxx which runs a test on an octree. The
>> octree is build from a 3D image where each pixel has a value.
>>
>> My question is now. Is it possible to use the above octree as
>> structure to find the k-nn to a point p?
>>
>> Assume that we have a 3D image which contains 12*12*12 nodes
>> distributed randomly in the volume. Now for a given point p in the
>> volume, the nodes within a specified radius r should be returned.
>>
>> As I understand the octree returns values of pixels and not locations
>> but maybe with some modification it could be possible to convert this
>> into locations? Does anyone have an idea for this?
>>
>
> My understanding is that typical practice says to use a kdtree for NN
> searches and an octree for ray intersections (although I've found the
> modified-BSP tree to be MUCH faster at ray intersections). Can someone
> verify this?
>
> Were you having a problem doing a NN search with the ITK kdtree?


Yes but it only happens when using it in a transform in a resampling
filter. I have tried various techniques (Valgrind, unit-test) to find
the error but I still have not been able to locate it. I can only
conclude that doing a seach on a kdTree from  the function
"TransformPoint" is not a good idea and will cause a segmentation
fault. But I am still trying to find it.


More information about the Insight-users mailing list