[vtkusers] lack of info on vtkobject....
David E DeMarle
dave.demarle at kitware.com
Fri Jun 17 23:22:15 EDT 2011
close but no.
This method is one of the ways that one can tell an vtkAlgorithm what array
it should operate on.
Algorithms can have multiple input ports and each one of those can actually
have multiple algorithms connected two it.
Ports are (by custom) for fundamentally distinct things, like the Input and
Source inputs to a vtkProbeFilter.
Connections on those ports are (again by custom) for fundamentally similar
things, like the multiple datasets fed into the single port of the
vtkAppendPolyData filter.
The data fed into each of those connections has a set of arrays that are
centered on the Cells another set of arrays that are centered on the Points,
and a third set of arrays which aren't centered on anything Field. This is
what field association means, the choice between the three.
Each of those are sets of arrays, and while arrays are typically named in
modern vtk usage it was not always so, so often you still see choosing a
particular array by its position in the set.
Using this method then, one can tell an algorithm that it should process the
idx'th array in the cell/point or field set of arrays on the connection'th
connection on the port'th input port. Most but not all algorithms will
respect your choice.
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
On Fri, Jun 17, 2011 at 11:06 PM, pratik <pratik.mallya.ml at gmail.com> wrote:
> Hi Everyone,
> After a bit more inspection, i think that the idx *probably* acts as a
> "proxy" for a "connection-on-a-port" specified when using
> SetInputArrayToProcess(i.e instead of using a port and a connection number,
> one just uses idx as a "proxy" number). I got this idea by the way
> GetinputArraytoProcess is used(where only the idx integer can be used to
> fetch the required DataArray).
>
> It would be really helpful if someone can confirm/deny this guess.
>
> Thanks in advance,
> Pratik
>
>
> On Saturday 18 June 2011 06:42 AM, pratik wrote:
>
>> Hi everyone,
>> Can anyone please tell me what the SetInputArraytoProcess method does? In
>> particular, I was confused about the 'idx' value that it uses...what does
>> that stand for? I believed that the input/output interface to vtkobjects
>> consisted of:
>> 1) ports and
>> 2) connections
>> so what is this "idx array" referring to exactly?
>>
>> The man page left me quite confused:
>> // Set the input data arrays that this algorithm will
>> // process. Specifically the idx array that this algorithm will process
>> (what is idx array?)
>> // (starting from 0) is the array on port, connection with the specified
>> // association and name or attribute type (such as SCALARS).
>> (what do these last two sentences mean? In particular what does "array on
>> port" mean? Is it the "connections"? )
>> // The
>> // fieldAssociation refers to which field in the data object the array is
>> // stored. See vtkDataObject::**FieldAssociations for detail.
>>
>>
>> Also, just out of curiosity, if there is no documentation for these
>> methods , then how are developers using them?
>>
>> Thanks in advance,
>> Pratik
>>
>
> ______________________________**_________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/**
> opensource/opensource.html<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 <http://www.vtk.org/Wiki/VTK_FAQ>
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/**listinfo/vtkusers<http://www.vtk.org/mailman/listinfo/vtkusers>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110617/7d335dca/attachment.htm>
More information about the vtkusers
mailing list