[vtk-developers] bug in vtkTensorGlyph
Amy Squillacote
ahs at cfdrc.com
Tue Apr 29 10:32:59 EDT 2008
Thanks!
David Cole wrote:
> Applied to CVS HEAD. We'll merge it to the VTK-5-2 branch after at
> least one night on the dashboard...
>
>
> On Mon, Apr 28, 2008 at 12:16 PM, Amy Squillacote <ahs at cfdrc.com
> <mailto:ahs at cfdrc.com>> wrote:
>
> It was as easy to fix as I expected. I've attached the patch.
>
> - Amy
>
>
> Amy Squillacote wrote:
>
> Thanks. Dave Cole offered to do that too. I'll try to send it
> later today to tomorrow.
>
> - Amy
>
> Berk Geveci wrote:
>
> Amy,
>
> If you send a patch, I can put it in the release.
>
> -berk
>
>
> On Mon, Apr 28, 2008 at 11:22 AM, Amy Squillacote
> <ahs at cfdrc.com <mailto:ahs at cfdrc.com>> wrote:
>
>
> Hi all,
>
> I just noticed that vtkTensorGlyph is not using the
> Set/GetInputArrayToProcess methods in vtkAlgorithm.
> Instead it is getting
> the tensors and scalars arrays directly from the
> vtkPointData of the input,
> so you have to set these on the filter's input in
> order to get it to work. I
> think it should be pretty straightforward to fix this,
> and it would be nice
> to have it in the 5.2 release as well.
>
> - Amy
>
> --
> Amy Squillacote Phone: (256) 726-4839
> Computer Scientist Fax: (256) 726-4806
> CFD Research Corporation Web:
> http://www.cfdrc.com
> 215 Wynn Drive, Suite 501
> Huntsville, AL 35805
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org <mailto:vtk-developers at vtk.org>
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
>
>
>
>
>
>
>
> --
> Amy Squillacote Phone: (256) 726-4839
> Computer Scientist Fax: (256) 726-4806
> CFD Research Corporation Web: http://www.cfdrc.com
> 215 Wynn Drive, Suite 501
> Huntsville, AL 35805
>
>
> Index: vtkTensorGlyph.cxx
> ===================================================================
> RCS file: /cvsroot/VTK/VTK/Graphics/vtkTensorGlyph.cxx,v
> retrieving revision 1.59
> diff -u -r1.59 vtkTensorGlyph.cxx
> --- vtkTensorGlyph.cxx 17 Sep 2006 15:01:24 -0000 1.59
> +++ vtkTensorGlyph.cxx 28 Apr 2008 16:10:15 -0000
> @@ -47,6 +47,14 @@
> this->Length = 1.0;
>
> this->SetNumberOfInputPorts(2);
> +
> + // by default, process active point tensors
> + this->SetInputArrayToProcess(0, 0, 0,
> vtkDataObject::FIELD_ASSOCIATION_POINTS,
> + vtkDataSetAttributes::TENSORS);
> +
> + // by default, process active point scalars
> + this->SetInputArrayToProcess(1, 0, 0,
> vtkDataObject::FIELD_ASSOCIATION_POINTS,
> + vtkDataSetAttributes::SCALARS);
> }
>
> //----------------------------------------------------------------------------
> @@ -115,8 +123,8 @@
>
> pd = input->GetPointData();
> outPD = output->GetPointData();
> - inTensors = pd->GetTensors();
> - inScalars = pd->GetScalars();
> + inTensors = this->GetInputArrayToProcess(0, inputVector);
> + inScalars = this->GetInputArrayToProcess(1, inputVector);
> numPts = input->GetNumberOfPoints();
>
> if ( !inTensors || numPts < 1 )
>
>
--
Amy Squillacote Phone: (256) 726-4839
Computer Scientist Fax: (256) 726-4806
CFD Research Corporation Web: http://www.cfdrc.com
215 Wynn Drive, Suite 501
Huntsville, AL 35805
More information about the vtk-developers
mailing list