[vtkusers] Merge polydatas of different sizes
David Gobbi
david.gobbi at gmail.com
Fri Oct 29 16:35:07 EDT 2010
Hi Joey,
ProbeFilter should output the same number of points as the dataset
given in SetSourceConnection(), and all the points should be in
exactly the same locations. The fact that both the Source and the
Input are vtkPolyData should not be a problem, or at least, I don't
think it should be.
The probe tests in VTK/Graphics/Testing/Tcl seem to use a 2D dataset
as the Source and a 3D dataset as the Input (like a 3D ImageData or
UnstructuredGrid). This is also the configuration that I've used for
vtkProbeFilter, myself (i.e. 2D mesh sampled from a 3D dataset). But
theoretically there is no reason that ProbeFilter shouldn't work with
two 2D datasets as long as they overlap.
David
On Fri, Oct 29, 2010 at 2:21 PM, Joey Mukherjee <joeymu at gmail.com> wrote:
> 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