[vtkusers] Glyphs on structuredGrid cell centers
Dominik Szczerba
dominik at itis.ethz.ch
Mon Feb 22 07:27:58 EST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Try passing your grid through CellCenters filter first.
Sebastian Gatzka wrote:
> Hello, me again.
>
> This time I'm facing trouble visualizing glyphs on my structured grid.
> Suppose I have done it right there is some vector data:
>
> vtkFloatArray *v2 = vtkFloatArray::New();
> v2->SetNumberOfComponents(3);
> for (unsigned i = 0; i < noCells; i++){
> v2->InsertNextTuple3(i,i,i);
> }
>
> assigned to the structured grid cell centers:
>
> sGrid->GetCellData()->SetVectors(v2);
>
> Now creating some glyphs
>
> vtkConeSource *cone = vtkConeSource::New();
> cone->SetResolution(6);
>
> vtkGlyph3D *glyph = vtkGlyph3D::New();
> glyph->SetInput( *sGrid* );
> glyph->SetSourceConnection(cone->GetOutputPort());
> glyph->SetVectorModeToUseNormal();
> glyph->SetScaleModeToScaleByVector();
> glyph->SetScaleFactor(0.25);
>
> results in some arrows located at the structured grid points (sGrid)
> instead of the cell centers.
>
> * So how do I give vtkGlyph3D the cell centers of the structured
> grid as input?
> * And how does the gylph filter know it should represent the vector
> data?!
>
> Sebastian
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkuCeEkACgkQ/EBMh9bUuzJJlwCg5wTX7HvW3lFbBtSPaRKvL/xq
JWgAnRnAFq78Z6B7NBcEYP9h/BDPIBJl
=yF5L
-----END PGP SIGNATURE-----
More information about the vtkusers
mailing list