[vtkusers] Scalar interpolation

Jothybasu Selvaraj jothybasu at gmail.com
Wed May 9 12:21:14 EDT 2012


vtkTable::GetValue() shoudl do that.


Jothy

On Wed, May 9, 2012 at 5:11 PM, Brian Curtis <bcurtis3 at masonlive.gmu.edu>wrote:

>  Jothy,
>
> Thanks for your reply.
>
> I am interested in printing the interpolated scalar values to the screen
> (Terminal window), how would I go about this?
>
> ~Brian
>
>
>
> On 05/09/2012 09:41 AM, Jothybasu Selvaraj wrote:
>
> This should help you
>
> vtkSmartPointer<vtkProbeFilter>pf=
> vtkSmartPointer<vtkProbeFilter>::New();
> pf->SetInput(cube);//cube as vtkImageData
> pf->SetSource(line);line as vtkPolyData
> pf->Update();
>
> //Returns the result as a vtkTable
> vtkSmartPointer<vtkDataObjectToTable>polyDataToTable=
> vtkSmartPointer<vtkDataObjectToTable>::New();
> polyDataToTable->SetInputConnection(pf->GetOutputPort());
> polyDataToTable->SetFieldType(vtkDataObjectToTable::POINT_DATA);
> polyDataToTable->Update();
>
> Jothy
>
> On Wed, May 9, 2012 at 2:17 PM, Brian Curtis <bcurtis3 at masonlive.gmu.edu>wrote:
>
>> Hi,
>>
>> I'm looking for an example that does this or a few examples that show the
>> proper way to do this.
>>
>> I'm not sure how to understand vtkProbeFilter from
>> http://www.vtk.org/doc/nightly/html/classvtkProbeFilter.html and what
>> part of it will do the work I need.
>>
>> vtkProbeFilter->Probe requires three vtkDataSet but how do I get my
>> points into a dataset?
>>
>> Thanks for your help,
>> ~Brian
>>
>> On 05/08/2012 11:10 AM, Brian Curtis wrote:
>>
>>> Hi,
>>>
>>> I am interested in creating the following simple example in order to
>>> expand off of at a later time:
>>> - Create a cube (8 points) with scalar values all set to 1
>>> - Create a line (5 points) that intersects with cube
>>> - Get scalar interpolations for the line from the cube
>>>
>>> Cube pts:
>>> float pts[8][3] = { {-1.0, -1.0, -1.0}, {-1.0, 1.0, -1.0},
>>>                        {-1.0, 1.0, 1.0}, {-1.0, -1.0, 1.0},
>>>                        {1.0, -1.0, -1.0}, {1.0, 1.0, -1.0},
>>>                        {1.0, 1.0, 1.0}, {1.0, -1.0, 1.0} };
>>> Line pts:
>>> float line[5][3] = { {-2.0, 2.0, -2.0}, {-1.0, 1.0, -1.0},
>>>                         {0.0, 0.0, 0.0}, {1.0, -1.0, 1.0}, {2.0, -2.0,
>>> 2.0} };
>>>
>>> I could not find a simple example to do this, and I'm not exactly sure
>>> if probefilter is the right way to go about this. What the best (and
>>> easiest) way to approach this problem?
>>>
>>> Thanks,
>>> ~Brian
>>>
>>> _______________________________________________
>>> 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
>>>
>>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Jothy
>
>
>


-- 
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120509/59e025d6/attachment.htm>


More information about the vtkusers mailing list