[Paraview] vtkUniformGrid
Benjamin Schindler
bschindler at inf.ethz.ch
Wed Nov 25 04:08:25 EST 2009
Hi
I'm writing a filter which creates a vtkUniformGrid as its output. The
grid is setup is done using the following code:
vtkUniformGrid *grid =
vtkUnformGrid::SafeDownCast(outInfo->Get(vtkDataObject::DATA_OBJECT));
grid->Initialize();
grid->SetOrigin(origin.data());
grid->SetDimensions(bins.data());
grid->GetDimensions(); // Call this so the dimensions array is set -
stupid VTK
grid->SetNumberOfScalarComponents(3);
grid->SetScalarTypeToDouble();
grid->SetSpacing(spacing.data());
grid->AllocateScalars();
I checked that spacing, origin and bins are set correctly.
Yet, when I run this filter (without setting any data, that data will
therefore be noise), I get an output in paraview without Extent, without
an Origin and without a bounding box, 0 cells etc.
What am I doing wrong here?
More information about the ParaView
mailing list