#include <vtkPointData.h>
#include <vtkCellData.h>
#include <vtkDataSet.h>
+#include <vtkIdList.h>
#include <vtkIntArray.h>
#include <algorithm>
return NULL;
}
+ //---------------------------------------------------------------
+ TElnoPoints
+ GetElnoPoints(vtkDataSet *theDataSet, vtkIdType theNodeObjID)
+ {
+ TElnoPoints aResult;
+ if(theDataSet && IsElnoData(theDataSet)) {
+ vtkDataSetAttributes *aDataSetAttributes = theDataSet->GetPointData();
+ vtkDataArray *aDataArray = aDataSetAttributes->GetArray("VISU_POINTS_MAPPER");
+ if(aDataArray){
+ if(vtkIntArray *anIntArray = dynamic_cast<vtkIntArray*>(aDataArray)){
+ int aNbTuples = anIntArray->GetNumberOfTuples();
+ int* aPointer = anIntArray->GetPointer(0);
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ if( *aPointer == theNodeObjID ) {
+ vtkIdList *aCellIds = vtkIdList::New();
+ theDataSet->GetPointCells(aTupleId,aCellIds);
+ if(aCellIds->GetNumberOfIds() == 1){
+ aResult.push_back(TElnoPointID(aTupleId,aCellIds->GetId(0)));
+ }
+ }
+ aPointer += 2;
+ }
+ }
+ }
+ }
+ return aResult;
+ }
//---------------------------------------------------------------
TTimerLog
vtkDataSet*
GetOutput(vtkInformationVector *theOutputVector);
+ //! Utility for ELNO Data Selection
+ //---------------------------------------------------------------
+ typedef vtkIdType TVTKPointID;
+ typedef vtkIdType TVTKCellID;
+ typedef std::pair<TVTKPointID,TVTKCellID> TElnoPointID;
+ typedef std::vector<TElnoPointID> TElnoPoints;
+
+ VISU_CONVERTOR_EXPORT
+ TElnoPoints
+ GetElnoPoints(vtkDataSet *theDataSet, vtkIdType theNodeObjID);
+
//---------------------------------------------------------------
//! The utility class that allows to perform perfomance mesurement
class VISU_CONVERTOR_EXPORT TTimerLog