[Paraview] Particle attributes in vtkPolyData

Randy Hudson hudson at mcs.anl.gov
Mon Apr 10 15:32:19 EDT 2006



This code

    cout << "[VTKPolyDataSetup::CreateScalarArray_1Part] - 0 - varname:
    " << varname << endl;
    variable_color1->SetName(varname);
    cout << "[VTKPolyDataSetup::CreateScalarArray_1Part] - 0 -
    variable_color1->GetName(): " << variable_color1->GetName() << endl;

gives me

    [VTKPolyDataSetup::CreateScalarArray_1Part] - 0 - varname: p_dens
    [VTKPolyDataSetup::CreateScalarArray_1Part] - 0 -
    variable_color1->GetName(): ƒÄƒ‹ƒ´
    Process id: 0 >> ERROR: In
    /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
    line 241
    vtkDoubleArray (0xe90f568): Unable to allocate 2147468465 elements
    of size 8: St9bad_alloc

    Process id: 0 >> ERROR: In
    /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
    line 241
    vtkDoubleArray (0xe90f568): Unable to allocate 2147468466 elements
    of size 8: St9bad_alloc

    Process id: 0 >> ERROR: In
    /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
    line 241
    vtkDoubleArray (0xe90f568): Unable to allocate 2147468467 elements
    of size 8: St9bad_alloc

    Process id: 0 >> ERROR: In
    /home/hudson/Software/ParaView.2.4.2/src_visprep/VTK/Common/vtkDataArrayTemplate.txx,
    line 241
    vtkDoubleArray (0xe90f568): Unable to allocate 2147468468 elements
    of size 8: St9bad_alloc

almost ad infinitum.

Cf. the garbage at the end of the second line.

So, the name must not be being set.

"varname" is a char*, which, as you can see from the first line of 
output, contains a valid char string.

This should work, right?


Berk Geveci wrote:
> The fact that it assigned Scalars_ makes me thing that the array is
> not getting a name. Can you verify in your code that SetName() is not
> null or empty?
>
> -Berk
>
>
>   

-- 

Randy.

"Just imagine if chutzpah destabilized the space-time continuum.  Then imagine Ted Kennedy taking to the floor of the Senate to denounce Cheney's accident reporting protocols.  Space and time would fold in on themselves in the well of the Senate and while Ted would vanish in a fzzztt...spork! and a burst of ozone, maybe a cool pterodactyl or woolly mammoth would escape through the rip in existence and terrorize the capitol.

                                                    Jonah Goldberg.



More information about the ParaView mailing list