[Paraview-developers] Get coordinates of selectetd cells in data set

Frank tt frank.tt at einseinself.org
Fri Nov 14 04:18:56 EST 2014


Hi,


I want to mark one or more cells at a surface data set. Now I'm
interestet in its coordines to use them for further analytics in my
plugin.

I'm trying to get something like:

int infoStream::RequestData( vtkInformation *vtkNotUsed(request),
                             vtkInformationVector **inputVector,
                             vtkInformationVector *outputVector )
{
    inputInfo = inputVector[0]->GetInformationObject(0);
    outputInfo = outputVector->GetInformationObject(0);

    inputData = vtkImageData::SafeDownCast( inputInfo->Get(vtkDataObject::DATA_OBJECT()) );


    // TODO:
    vtkIdList cellPtIds = inputInfo->GetCellSelection();
    vtkCell3D cell = cellPtIds->getMiddle();
    std::vector coords <int> = cell->getCoords();


    return 1;
}

I know about the 'Selection Inspector' (PV 3.3.0). In my version (4.1.0), it
does not exist. I've found a 'Selection Display Inspector' with some
different functions.

I don't know how to get the selection from the user to the plugin and work with it.

I'm using locally:
ParaView 4.1.0
Qt 4.8.6

server side:
ParaView 4.1.0
OSMesa 7.11.2
OpenMPI 1.8.1



Greetings,
Frank




More information about the Paraview-developers mailing list