[vtkusers] Getting array values from vtkVoxelModeller
Mark Gooding
mark.gooding at gmail.com
Wed Jan 17 06:15:41 EST 2007
Hi all,
I think I'm learning from my mistake/previous posts to the list, but
perhaps not...
I'm trying access the array data produced by vtkVoxelModeller (code at
the end). However once again I'm getting a null pointer from the
SafeDownCast of GetScalars(). So endeavouring to learning from my
previous mistakes of using the wrong array type, I've tried Bits (what
the documentation seems to imply), Doubles (what GetScalarTypeAsString
tells me it is), UnsignedChars (what I'd like it to be), Int and Float
(because I was speculating).
Am I doing something wrong (other than guessing scalar types) which is
causing me to get no result?
Cheers,
Mark
----code----
vtkVoxelModeller* myVoxelModeller = vtkVoxelModeller::New();
myVoxelModeller ->SetModelBounds(regions->GetBounds());
vtkBitArray* UpdateRegionBitArray = vtkBitArray::New();
UpdateRegionBitArray =
vtkBitArray::SafeDownCast(UpdateRegionsVoxelModeller->GetOutput()->GetPointData()->GetScalars());
More information about the vtkusers
mailing list