No subject


Thu Aug 21 14:30:17 EDT 2008


the input.

  vtkDataArary *input_array =3D this->GetInputArrayToProcess(0, input);

By the way, I notice that you are using the old-style filter convention of
overriding Execute and calling GetInput and GetOutput on yourself.  New
filters should really override RequestData and get the inputs and outputs
from the inputVector and outputVector arguments, respectively.  The data
objects have convenience methods to get the data objects from the
information vectors.

  vtkStructuredGrid *input =3D vtkStructuredGrid::GetData(inputVector[0]);
  vtkStructuredGrid *output =3D vtkStructuredGrid::GetData(outputVector);

-Ken


On 9/4/08 6:57 AM, "David E DeMarle" <dave.demarle at kitware.com> wrote:

> vtkPointData is a collection of arrays (for example temperature,
> density, velocity), each of which may have multiple components (for
> example VEL_X, VEL_Y, VEL_Z) and multiple tuples (the temperature at
> the first point, the temperature at the second point, ..., the
> temperature at the millionth point). vtkPointData::GetScalars() will
> give you access to the currently active scalar array. You will then
> have to get access to the raw pointer or use element indexing (both of
> which are descibed in the vtkDataArray documentation) to do element
> wise arithmetic. Lastly, you may want to look at the calculator
> filter.
>
> cheers,
> Dave DeMarle
>
>
> On Thu, Sep 4, 2008 at 3:23 AM, Natalie Happenhofer
> <nataliehapp at hotmail.com> wrote:
>> Hi!
>> I=B4m writing a filter and I want to perform arithmetic operations, i.e.=
 "+=3D"
>> with the scalar data associated to each point of my grid. So I get the P=
oint
>> Data from the input file:
>>
>> void vtkHorizontalAverage::Execute()
>> {vtkStructuredGrid *input =3D this->GetInput();
>> vtkStructuredGrid *output =3D this->GetOutput();
>>
>>  vtkPointData *inPtr =3D input->GetPointData();
>>  vtkPointData *outPtr =3D output->GetPointData();
>> ...
>>
>> here and now I want to apply the +=3D operator, but I have no idea how t=
o cast
>> my vtkPointData - object, since I do not really know where to fit the ca=
st
>> operator in, to the vtkPointData class or to the vtkDataArray..
>>
>> I could also use a reinterpretcast, but I=B4m not sure if the format of =
the
>> data in vtkPointData is double or float..
>>
>> So, any help would be apreciated!
>> thx,
>> NH
>>
>>
>>
>> ________________________________
>> Express yourself instantly with MSN Messenger! MSN Messenger
>> _______________________________________________
>> ParaView mailing list
>> ParaView at paraview.org
>> http://www.paraview.org/mailman/listinfo/paraview
>>
>>
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>




More information about the ParaView mailing list