[vtkusers] volume mapper error

Franks masterwangzx at gmail.com
Thu Nov 15 20:18:23 EST 2018


1. When I commet out the the line of 'RemoveArray(0)', I still get the
problem. When I change number of NumberOfComponents to 1, I get no error.
Why the mapper can not handle with the two-components data? The following
code can run with no error.
    
    auto tuples = vtkSmartPointer<vtkFloatArray>::New();
    tuples->DeepCopy(reader->GetOutput()->GetPointData()->GetScalars());
    tuples->SetNumberOfComponents(1);
    for (int i = 0; i < tuples->GetNumberOfTuples(); ++i) {
        tuples->SetTuple1(i,80);
    }

    reader->GetOutput()->GetPointData()->RemoveArray(0);
    reader->GetOutput()->GetPointData()->SetScalars(tuples);

2. I am the beginner. I can not understand the meaning of backtrace well.
The console only print "Signal: SIGSEGV (Segmentation fault)" and the clion
debugger display the following picture.
<http://vtk.1045678.n5.nabble.com/file/t342588/Screenshot_20181116_091552.png> 



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html


More information about the vtkusers mailing list