[vtkusers] VTK+Intel GMA 950

Dominik Szczerba domi at vision.ee.ethz.ch
Thu Oct 19 09:11:53 EDT 2006


Hi,
Does anyone run VTK on the Intel GMA 950 chip? If yes, I would be very 
interested to hear how it works (what it can do).
Thanks,
Dominik

On Thursday 19 October 2006 11:01, Oscar Yañez Suarez wrote:
> Ok, so I've solved this problem thanks to Dean's help and further
> investigation. I post this to the list in case it helps anyone else.
>
> 1) First of all, using vtkImageGradient on a 2D image with
> SetDimensionality( 3 ) correctly yields a three-component Scalars, and
> the third component, which I thought initially would be a constant
> zero value (as theory indicates) is actually a constant nan. So, doing
> a SetDimensionality( 2 ) and padding the third component with zeros as
> Dean suggested is the way to get the correct 3D vector field, although
> still in the wrong place for visualization using glyphs (in Scalars
> instead of Vectors).
>
> 2) To overcome the Scalars/Vectors thing I tried using a
> vtkAssignAttribute:
>
> vtkAssignAttribute aa
>     aa SetInput [ hgrds GetOutput ]
>     aa Assign SCALARS VECTORS POINT_DATA
>
> but that always outputs an object with no Vectors array. I have no
> idea of why this doesn't work. So, I did it in a nasty way, modifying
> by brute force the Vectors array where needed:
>
> vtkImageGradient hgrd
>    hgrd SetInput [ himg GetOutput ]
>    hgrd SetDimensionality 2
>    hgrd HandleBoundariesOn
> vtkImageConstantPad hgrd3
>    hgrd3 SetOutputNumberOfScalarComponents 3
>    hgrd3 SetConstant 0
>    hgrd3 SetInput [ hgrd GetOutput ]
> vtkImageShrink3D hgrds
>    hgrds SetInput [ hgrd3 GetOutput ]
>    hgrds SetShrinkFactors 4 4 1
>    hgrds Update
>    set arr [ [ [ hgrds GetOutput ] GetPointData ] GetScalars ]
>    [ [ hgrds GetOutput ] GetPointData ] SetVectors $arr
>
> and this yields an hgrds output with a Vectors array equal to the
> Scalars array. Of course, if anything gets updated upstream, the
> Vectors array is not changed =(. This was the whole point of
> vtkAssignAttribute. Maybe I am not using it correctly ....
>
> So, time to move on ...

-- 
Dominik Szczerba, Ph.D.
Computer Vision Lab, ETH
http://www.vision.ee.ethz.ch/~domi



More information about the vtkusers mailing list