[vtkusers] Voxelize a point cloud (vtkVoxelModeller?)

David Doria daviddoria+vtk at gmail.com
Tue Nov 3 16:44:06 EST 2009


On Tue, Nov 3, 2009 at 4:00 PM,  <lynx.abraxas at freenet.de> wrote:
> On 02/11/09 17:18:41, David Doria wrote:
>> Lynx,
>>
>> Yes, this is perfect. I made an example here:
>> http://www.vtk.org/Wiki/Embed_points_into_a_volume
>> Maybe vtkVoxelModeller should be marked as deprecated? Or was I not
>> using it for the its intended use?
>>
>> I tried to do SetRadius(0) which I thought would set the "spread" of
>> the point to be zero (an impulse) and therefore the entire
>> contribution of the point would be added directly to the voxel that it
>> is inside. However, when I did that (and even with SetRadius(.01)),
>> none of the voxels received any contributions (i.e. the resulting
>> imagedata was completely zeros). Do you know why that might be?
>>
>
> Hm,  I'm  not  sure.  I've  been  wondering about the parameters the Gaussiain
> Splatter needs.
> (there is an example http://www.itk.org/Wiki/Create_a_surface_from_Unorganized_Points_(Gaussian_Splat))
> The  radius (as the docs state, SetRadius) is expressed as a percentage of the
> length of the longest side of the sampling volume. I haven't found the time to
> check  but  perhaps 1/(2n) (eg. 0.05) would give an effective range of 1 voxel
> in Your example. Below (if rounded) will probably result in what You got.
> I'm not really  understanding  SetModelBounds.  I'd  think  a  parameter  that
> restricts  the  sampling  reagion  is  necessary since the Gaussian extends to
> infinity. If SetModelBounds
> is doint that setting that to 1 voxel might help as well.
> One thing I'm not sure is if the filter generates a Gaussian  blob  (extending
> acc.  to  ModelBounds)  at  the  injection  point  or  if  it "injectes random
> secondary points" distributed gaussian. In the latter (random) case one  would
> need to worry if there is always a full contribution to the centre voxel.
>
> Hope this might be of help.
> Lynx

Lynx,

My main concern is still that no matter how Radius is specified, a
radius of 0 should result in an "impulse" at the point coordinate and
therefore contribute the points weight entirely to the voxel that
contains it, no? Can anyone explain why, instead, no points contribute
anything to the volume when Radius=0?

Thanks,

David



More information about the vtkusers mailing list