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?

_______________________________________________
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