[vtk-developers] patch for vtkPolyDataConnectivityFilter

David Cole david.cole at kitware.com
Wed Jul 30 15:36:32 EDT 2008


Amy,
After you commit, save the cvs commit output and forward it to me. I'll put
it on the queue for merging into the VTK-5-2 branch.


Thx,
David


2008/7/30 Amy Squillacote <ahs at cfdrc.com>

> Hi all,
>
> In recently trying to use vtkPolyDataConnectivityFilter, I discovered that
> if you turn coloring on (to save the component id to a point data scalar
> array), the array marked as scalars in the input point data is not copied
> through to the output. Additionally, the "coloring" array has no name. The
> attached patch corrects these two issues. The coloring array is added to the
> point data and set as "scalars", but the input point data scalars are not
> removed. Also, the coloring array is named "RegionId" to match the name used
> in vtkConnectivityFilter.
>
> If no one sees a problem with this, I will commit the change. Would it be
> possible to put this change on the 5.2 branch 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
>
>
> Index: vtkPolyDataConnectivityFilter.cxx
> ===================================================================
> RCS file: /cvsroot/VTK/VTK/Graphics/vtkPolyDataConnectivityFilter.cxx,v
> retrieving revision 1.41
> diff -u -r1.41 vtkPolyDataConnectivityFilter.cxx
> --- vtkPolyDataConnectivityFilter.cxx   2 Nov 2007 15:39:02 -0000
> 1.41
> +++ vtkPolyDataConnectivityFilter.cxx   30 Jul 2008 18:11:01 -0000
> @@ -147,6 +147,7 @@
>     }
>
>   this->NewScalars = vtkIdTypeArray::New();
> +  this->NewScalars->SetName("RegionId");
>   this->NewScalars->SetNumberOfTuples(numPts);
>   newPts = vtkPoints::New();
>   newPts->Allocate(numPts);
> @@ -265,11 +266,6 @@
>   // everything that has been visited.
>   //
>   //Pass through point data that has been visited
> -  pd = input->GetPointData();
> -  if ( this->ColorRegions )
> -    {
> -    outputPD->CopyScalarsOff();
> -    }
>   outputPD->CopyAllocate(pd);
>   outputCD->CopyAllocate(cd);
>
>
> _______________________________________________
> vtk-developers mailing list
> vtk-developers at vtk.org
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20080730/d721b54e/attachment.html>


More information about the vtk-developers mailing list