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
_______________________________________________
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 ParaView Wiki at: 
http://paraview.org/Wiki/ParaView

Follow this link to subscribe/unsubscribe:
http://www.paraview.org/mailman/listinfo/paraview

Reply via email to