[Paraview-developers] Get coordinates of selectetd cells in data set
Frank tt
frank.tt at einseinself.org
Mon Nov 17 02:29:18 EST 2014
Hi.
I found an interesting filter 'Extract Selection'.
It creates an new data set only including the selection of the current
data set. In the Properties dock is a function 'Copy Active Selection'.
Now I'm trying to analyse the code to get an idea, what I should do for
my plugin. Are
source/ParaViewCore/ClientServerCore/Core/vtkPVExtractSelection.h and
its *.cxx the correct files I found an surface selection example in?
Where is the *.ui or server manger *.xml file?
Greetings
Frank
On Fri, 2014-11-14 at 10:18 +0100, Frank tt wrote:
> 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
>
>
> _______________________________________________
> Paraview-developers mailing list
> Paraview-developers at paraview.org
> http://public.kitware.com/mailman/listinfo/paraview-developers
More information about the Paraview-developers
mailing list