[vtkusers] Merge polydatas of different sizes

Joey Mukherjee joeymu at gmail.com
Fri Oct 29 16:21:46 EDT 2010


This looks like what I want, but I cannot for the life of me get the
probe to mix with my dataset!  I always get zero points when I print
out either probe->GetOutput()->GetNumberOfPoints() or
probe->GetValidPoints()->GetNumberOfTuples().

Some more information:  both data sets are vtkPolyData's.  One is a
sphere which a range of -1 to 1 for X, Y, and Z  ranges from -1 to
0.999999.  For the other data set, it ranges from -0.114 to 0.114 on X
and Y, and -1 to -0.9 on Z.  Since these overlap, I should see
something, right?

Anything else I can try?

Thanks,
Joey

On Thu, Oct 28, 2010 at 1:47 PM, David Gobbi <david.gobbi at gmail.com> wrote:
> Hi Joey,
>
> The vtkProbeFilter can apply the scalars of one dataset to a
> second dataset.  It uses interpolation so it does not require a
> point-to-point match.  I suggest that you look at the code in
> vtkProbeFilter.cxx to see if it does what you need.
>
>  David
>
> On Thu, Oct 28, 2010 at 10:09 AM, Joey Mukherjee <joeymu at gmail.com> wrote:
>> I have two datasets which I am using/rendering as polydata.  I can
>> overlay these datasets and see that the results line up like I expect
>> geometrically.
>>
>> However, I would like to color one dataset by the scalars of the
>> other.  The problem is the datasets are different size and in fact,
>> the one I would like to use a "color" is just a subset of the first
>> dataset.  Ideally, I'd like to color just the parts present in the
>> second dataset and leave the remaining scalars from the first dataset
>> in place.
>>
>> Or maybe the reverse?  Get the subset of the geometry from the first
>> dataset and then apply these colors, and then continue to overlay
>> them?
>>
>> My first dataset has been warped with vtkWarpScalar and its geometry
>> is perfect.  I just want to change the colors on a small region of the
>> entire image.
>>
>> Does anyone have any hints on what filters I can use to achieve this?
>>
>> Thanks,
>> Joey
>> _______________________________________________
>> 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
>>
>



More information about the vtkusers mailing list