vtkPointData* aPntData = aDataSet->GetPointData();
for (int ind = 1; ind <= aMapIndex.Extent(); ind++) {
- int aID = aMapIndex(ind);
+ int anID = aMapIndex(ind);
switch (aType) {
case 0:
{
- float aCoord[3];
- aDataSet->GetPoint(aID, aCoord);
+ float* aCoord = anVISUActor->GetNodeCoord(anID);
+ int aVTKID = anVISUActor->GetNodeVTKID(anID);
myXValLbl->setText( QString::number( aCoord[0] ) );
myYValLbl->setText( QString::number( aCoord[1] ) );
myZValLbl->setText( QString::number( aCoord[2] ) );
- myIDValLbl->setText( QString::number(aID) );
- myScalarValLbl->setText(getValue(aPntData, aID));
- myVectorValLbl->setText(getVector(aPntData, aID));
+ myIDValLbl->setText( QString::number(anID) );
+ myScalarValLbl->setText(getValue(aPntData, aVTKID));
+ myVectorValLbl->setText(getVector(aPntData, aVTKID));
}
break;
case 1:
{
- vtkCellData* aData = aDataSet->GetCellData();
- vtkCell* aCell = anVISUActor->GetElemCell(aID);
- int aVTKID = anVISUActor->GetNodeVTKID(aID);
+ vtkCellData* aCellData = aDataSet->GetCellData();
+ vtkCell* aCell = anVISUActor->GetElemCell(anID);
+ int aVTKID = anVISUActor->GetElemVTKID(anID);
if (aCell != NULL) {
int aNbOfPoints = aCell->GetNumberOfPoints();
if ( aNbOfPoints <= 1 ) { // Cell is point
clearFields();
} else {
- myCellIDValLbl->setText( QString::number(aID) );
- myCellScalarValLbl->setText(getValue(aData, aVTKID));
- myCellVectorValLbl->setText(getVector(aData, aVTKID));
+ myCellIDValLbl->setText( QString::number(anID) );
+ myCellScalarValLbl->setText(getValue(aCellData, aVTKID));
+ myCellVectorValLbl->setText(getVector(aCellData, aVTKID));
float* aCoord;
vtkIdList *aPointList = aCell->GetPointIds();