<div>I have been staring at this for a while and could be making a really dumb error, but can anyone explain why the last line segfaults please...? I am guessing that I need to initialise something?</div><div><br></div><div>
vtkSmartPointer<vtkImageData> imageData = vtkSmartPointer<vtkImageData>::New();</div><div> imageData->SetExtent(0, 10, 0, 10, 0, 0);</div><div> imageData->SetOrigin(0.0, 0.0, 0.0);</div><div> imageData->SetSpacing(0.1, 0.1, 0.0);</div>
<div> imageData->SetScalarTypeToDouble();</div><div> vtkSmartPointer<vtkCellData> cellData = imageData->GetCellData();</div><div> cout << cellData->GetNumberOfArrays() << endl;</div><div>
<br></div><div>Thanks,</div><div>Brett.</div>