[Paraview] Spreadsheet display of Field Data?

Cory Quammen cquammen at cs.unc.edu
Mon Jun 3 15:14:40 EDT 2013


Ah, never mind. I forgot to set a name for the array.

If I add

bestDimensionsArray->SetName( ... );

the field data array shows up as expected.

It seems like you should still be able to see the array values if the
array doesn't have a name, though.

Cory


On Mon, Jun 3, 2013 at 3:05 PM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Hi all,
>
> I have a custom VTK filter that I am using to create a ParaView
> filter. I'd like to store some information about the output from the
> filter in the output's field data. My filter sets the field data for
> this output as follows:
>
>   vtkPolyData *output1 = vtkPolyData::SafeDownCast(
>     outputVector->GetInformationObject(1)->Get(
>         vtkDataObject::DATA_OBJECT()));
>
>   // do some stuff
>
>   vtkStdString xColumnString( ... );
>   vtkStdString yColumnString( ... );
>   vtkStdString zColumnString( ... );
>
>   vtkSmartPointer< vtkStringArray > bestDimensionsArray =
>     vtkSmartPointer< vtkStringArray >::New();
>   bestDimensionsArray->SetNumberOfValues( 3 );
>   bestDimensionsArray->SetValue( 0, xColumnString );
>   bestDimensionsArray->SetValue( 1, yColumnString );
>   bestDimensionsArray->SetValue( 2, zColumnString );
>
>   vtkSmartPointer< vtkFieldData > fieldData =
>     vtkSmartPointer< vtkFieldData >::New();
>   fieldData->AddArray( bestDimensionsArray );
>
>   output1->SetFieldData( fieldData );
>
> I was expecting to be able to see the field data in a spreadsheet view
> of the data. However, all I see is a single column with three empty
> cells.
>
> Thinking it might be a problem specific to vtkStringArray, I tried to
> set the field data to have a single vtkDoubleArray. However, I still
> get empty cells.
>
> Am I doing something wrong? I looked at the bug tracker but didn't
> find any open issues with regards to displaying field data in the
> spreadsheet view.
>
> Thanks!
> Cory
>
> --
> Cory Quammen
> Research Associate
> Department of Computer Science
> The University of North Carolina at Chapel Hill



-- 
Cory Quammen
Research Associate
Department of Computer Science
The University of North Carolina at Chapel Hill


More information about the ParaView mailing list