[vtkusers] Error accessing vtkDataArray from vtkDataSet object

shawn mckenzie shawn.mcknezie at gmail.com
Fri Jul 14 13:35:14 EDT 2006


I am attempting to access data arrays from my vtkDataSet objects.
vtkDataSet->GetPointData->GetScalars should be accessible for all vtkDataSet
types, i believe.

my code:

vtkDataSet *output = vtkDataSet::SafeDownCast(
    outInfo->Get(vtkDataObject::DATA_OBJECT()));
outPD = output->GetPointData();
vtkDataArray *scalarArray = outPD->GetScalars();

In this case i have a vtkPolyData input. When i attempt to print the number
of components, my program crashes without error:

myOutputFile << scalarArray->GetNumberOfComponents();

Has anyone encountered this problem? any help apreciated

thank you
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20060714/4b080119/attachment.htm>


More information about the vtkusers mailing list