::GetVTKOutput()
{
GetFilter()->Update();
- return GetFilter()->GetUnstructuredGridOutput();
+ return GetFilter()->GetOutput();
}
aFilter->SetScalars(aDataSet);
aFilter->SetVectors(aDataSet);
aFilter->AddField("VISU_FIELD",aDataSet);
+ aFilter->AddField("VISU_CELLS_MAPPER",aDataSet);
+ aFilter->AddField("VISU_POINTS_MAPPER",aDataSet);
}
- return myFilter->GetUnstructuredGridOutput();
+ return myFilter->GetOutput();
}
vtkIdType
aCellTypesArray->SetValue(anID,(unsigned char)theGeom);
}
+ {
+ int aNbTuples = aNbCells;
+ vtkIntArray *aDataArray = vtkIntArray::New();
+ aDataArray->SetName("VISU_CELLS_MAPPER");
+ aDataArray->SetNumberOfComponents(1);
+ aDataArray->SetNumberOfTuples(aNbTuples);
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ int anObjID = theSubMesh->GetElemObjID(aTupleId);
+ aDataArray->SetValue(aTupleId, anObjID);
+ }
+ theSource->GetCellData()->AddArray(aDataArray);
+ aDataArray->Delete();
+ }
+
vtkIdType *pts = 0, npts = 0;
VTKViewer_CellLocationsArray* aCellLocationsArray = VTKViewer_CellLocationsArray::New();
aCellLocationsArray->SetNumberOfComponents(1);
{
int aNbTuples = theField->myDataSize/theField->myNbComp;
std::string aFieldName = GenerateFieldName(theField,theValForTime);
+
+ {
+ PIDMapperFilter anIDMapperFilter = theValForTime->myIDMapperFilter;
+ VISU::TVTKOutput* anOutput = anIDMapperFilter->GetVTKOutput();
+ anOutput->Update();
+ {
+ int aNbTuples = anOutput->GetNumberOfCells();
+ vtkIntArray *aDataArray = vtkIntArray::New();
+ aDataArray->SetName("VISU_CELLS_MAPPER");
+ aDataArray->SetNumberOfComponents(1);
+ aDataArray->SetNumberOfTuples(aNbTuples);
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ int anObjID = anIDMapperFilter->GetElemObjID(aTupleId);
+ aDataArray->SetValue(aTupleId, anObjID);
+ }
+ theSource->GetCellData()->AddArray(aDataArray);
+ aDataArray->Delete();
+ }
+ {
+ int aNbTuples = anOutput->GetNumberOfPoints();
+ vtkIntArray *aDataArray = vtkIntArray::New();
+ aDataArray->SetName("VISU_POINTS_MAPPER");
+ aDataArray->SetNumberOfComponents(1);
+ aDataArray->SetNumberOfTuples(aNbTuples);
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ int anObjID = anIDMapperFilter->GetNodeObjID(aTupleId);
+ aDataArray->SetValue(aTupleId, anObjID);
+ }
+ theSource->GetPointData()->AddArray(aDataArray);
+ aDataArray->Delete();
+ }
+ }
vtkDataSetAttributes* aDataSetAttributes;
switch(theEntity){
aCellLocationsArray->SetValue(i,aConnectivity->GetTraversalLocation(npts));
theSource->SetCells(aCellTypesArray,aCellLocationsArray,aConnectivity);
+ {
+ int aNbTuples = aNbCells;
+ vtkIntArray *aDataArray = vtkIntArray::New();
+ aDataArray->SetName("VISU_CELLS_MAPPER");
+ aDataArray->SetNumberOfComponents(1);
+ aDataArray->SetNumberOfTuples(aNbTuples);
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ int anObjID = theSubProfile->GetElemObjID(aTupleId);
+ aDataArray->SetValue(aTupleId, anObjID);
+ }
+ theSource->GetCellData()->AddArray(aDataArray);
+ aDataArray->Delete();
+ }
+
aCellLocationsArray->Delete();
aCellTypesArray->Delete();
aConnectivity->Delete();
//ENK: 23.11.2006
const TVTKSource& aSource = aSubMesh->GetSource();
aSource->SetPoints(GetPoints(aMesh));
- GetCellsOnSubMesh(aSource,aMeshOnEntity,aSubMesh,aVGeom);
+ GetCellsOnSubMesh(aSource, aMeshOnEntity, aSubMesh, aVGeom);
anAppendFilter->AddInput(aSource.GetPointer());
aSubMesh->myStartID = aCellID;
#include <vtkStructuredPoints.h>
#include <vtkUnstructuredGrid.h>
+#include <vtkIdList.h>
+#include <vtkCell.h>
+
+#include <algorithm>
+#include <vector>
+#include <map>
+
namespace VISU
{
this->FieldList->Add(name, input);
}
-void VISU_MergeFilter::Execute()
+namespace
{
- vtkIdType numPts, numScalars=0, numVectors=0, numNormals=0, numTCoords=0;
- vtkIdType numTensors=0;
- vtkIdType numCells, numCellScalars=0, numCellVectors=0, numCellNormals=0;
- vtkIdType numCellTCoords=0, numCellTensors=0;
- vtkPointData *pd;
- vtkDataArray *scalars = NULL;
- vtkDataArray *vectors = NULL;
- vtkDataArray *normals = NULL;
- vtkDataArray *tcoords = NULL;
- vtkDataArray *tensors = NULL;
- vtkCellData *cd;
- vtkDataArray *cellScalars = NULL;
- vtkDataArray *cellVectors = NULL;
- vtkDataArray *cellNormals = NULL;
- vtkDataArray *cellTCoords = NULL;
- vtkDataArray *cellTensors = NULL;
- vtkDataSet *output = this->GetOutput();
- vtkPointData *outputPD = output->GetPointData();
- vtkCellData *outputCD = output->GetCellData();
-
- vtkDebugMacro(<<"Merging data!");
+ typedef std::vector<int> TSortedArray;
- // geometry needs to be copied
- output->CopyStructure(this->GetInput());
- if ( (numPts = this->GetInput()->GetNumberOfPoints()) < 1 )
- {
- vtkWarningMacro(<<"Nothing to merge!");
- }
- numCells = this->GetInput()->GetNumberOfCells();
-
- if ( this->GetScalars() )
- {
- pd = this->GetScalars()->GetPointData();
- scalars = pd->GetScalars();
- if ( scalars != NULL )
- {
- numScalars = scalars->GetNumberOfTuples();
- }
- cd = this->GetScalars()->GetCellData();
- cellScalars = cd->GetScalars();
- if ( cellScalars != NULL )
- {
- numCellScalars = cellScalars->GetNumberOfTuples();
- }
- }
+ inline
+ void
+ GetSortedArray(vtkIntArray *theArray, TSortedArray& theSortedArray)
+ {
+ int aMaxId = theArray->GetMaxId();
+ int* aPointer = theArray->GetPointer(0);
+ int* anEndPointer = theArray->GetPointer(aMaxId + 1);
+ TSortedArray aSortedArray(aPointer, anEndPointer);
+ std::sort(aSortedArray.begin(), aSortedArray.end());
+ theSortedArray.swap(aSortedArray);
+ }
- if ( this->GetVectors() )
- {
- pd = this->GetVectors()->GetPointData();
- vectors = pd->GetVectors();
- if ( vectors != NULL )
- {
- numVectors= vectors->GetNumberOfTuples();
- }
- cd = this->GetVectors()->GetCellData();
- cellVectors = cd->GetVectors();
- if ( cellVectors != NULL )
- {
- numCellVectors = cellVectors->GetNumberOfTuples();
- }
- }
+ typedef std::map<int,int> TId2IdMap;
- if ( this->GetNormals() )
- {
- pd = this->GetNormals()->GetPointData();
- normals = pd->GetNormals();
- if ( normals != NULL )
- {
- numNormals= normals->GetNumberOfTuples();
- }
- cd = this->GetNormals()->GetCellData();
- cellNormals = cd->GetNormals();
- if ( cellNormals != NULL )
- {
- numCellNormals = cellNormals->GetNumberOfTuples();
+ template <class IT, class OT>
+ void DeepCopyArrayOfDifferentType(IT *theInputPtr, OT *theOutputPtr,
+ const TSortedArray& theIntersection,
+ const TId2IdMap& theObj2VTKMap,
+ vtkIdType theNbComp)
+ {
+ vtkIdType aNbIds = theIntersection.size();
+ for(vtkIdType aTargetTupleId = 0; aTargetTupleId < aNbIds; aTargetTupleId++){
+ vtkIdType anObjId = theIntersection[aTargetTupleId];
+ TId2IdMap::const_iterator anIter = theObj2VTKMap.find(anObjId);
+ vtkIdType aSourceTupleId = anIter->second;
+ for(vtkIdType aComp = 0; aComp < theNbComp; aComp++)
+ theOutputPtr[aTargetTupleId*theNbComp + aComp] =
+ static_cast<OT>(theInputPtr[aSourceTupleId*theNbComp + aComp]);
+ }
+ }
+
+ template <class IT>
+ void DeepCopySwitchOnOutput(IT *theInputPtr, vtkDataArray *theDataArray,
+ const TSortedArray& theIntersection,
+ const TId2IdMap& theObj2VTKMap,
+ vtkIdType theNbComp)
+ {
+ void *anOutputPtr = theDataArray->GetVoidPointer(0);
+ switch(theDataArray->GetDataType()){
+ vtkTemplateMacro5(DeepCopyArrayOfDifferentType, theInputPtr, (VTK_TT*)anOutputPtr,
+ theIntersection, theObj2VTKMap,
+ theNbComp);
+ default:
+ vtkGenericWarningMacro(<<"Unsupported data type!");
+ }
+ }
+
+ typedef vtkDataArray* (vtkDataSetAttributes::* TGetAttribute)();
+ typedef int (vtkDataSetAttributes::* TSetAttribute)(vtkDataArray*);
+
+ void
+ DeepCopyArray(vtkDataArray* theDataArray,
+ vtkDataSetAttributes* theOutput, TSetAttribute theSetAttribute,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ if(theDataArray){
+ vtkIdType aNbTuples = theDataArray->GetNumberOfTuples();
+ vtkIdType aNbComp = theDataArray->GetNumberOfComponents();
+
+ vtkDataArray *aDataArray = vtkDataArray::CreateDataArray(theDataArray->GetDataType());
+ aDataArray->SetNumberOfTuples(aNbTuples);
+ aDataArray->SetNumberOfComponents(aNbComp);
+ void *anInputPtr = theDataArray->GetVoidPointer(0);
+
+ switch(theDataArray->GetDataType()){
+ vtkTemplateMacro5(DeepCopySwitchOnOutput, (VTK_TT*)anInputPtr, aDataArray,
+ theIntersection, theObj2VTKMap,
+ aNbComp);
+ default:
+ vtkGenericWarningMacro(<<"Unsupported data type!");
}
+
+ (theOutput->*theSetAttribute)(aDataArray);
+ aDataArray->Delete();
}
+ }
- if ( this->GetTCoords() )
- {
- pd = this->GetTCoords()->GetPointData();
- tcoords = pd->GetTCoords();
- if ( tcoords != NULL )
- {
- numTCoords= tcoords->GetNumberOfTuples();
- }
- cd = this->GetTCoords()->GetCellData();
- cellTCoords = cd->GetTCoords();
- if ( cellTCoords != NULL )
- {
- numCellTCoords = cellTCoords->GetNumberOfTuples();
+ void
+ DeepCopyAttribute(vtkDataSetAttributes* theInput, TGetAttribute theGetAttribute,
+ vtkDataSetAttributes* theOutput, TSetAttribute theSetAttribute,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ DeepCopyArray((theInput->*theGetAttribute)(),
+ theOutput, theSetAttribute,
+ theIntersection, theObj2VTKMap);
+ }
+
+ inline
+ void
+ DeepCopyDataSetAttribute(vtkDataSet* theInput, TGetAttribute theGetAttribute,
+ vtkDataSet* theOutput, TSetAttribute theSetAttribute,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ DeepCopyAttribute(theInput->GetPointData(), theGetAttribute,
+ theOutput->GetPointData(), theSetAttribute,
+ theIntersection, theObj2VTKMap);
+ DeepCopyAttribute(theInput->GetCellData(), theGetAttribute,
+ theOutput->GetCellData(), theSetAttribute,
+ theIntersection, theObj2VTKMap);
+ }
+
+ void
+ DeepCopyField(vtkDataSetAttributes* theInput, const char* theFieldName, vtkDataSetAttributes* theOutput,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ DeepCopyArray(theInput->GetArray(theFieldName), theOutput, &vtkDataSetAttributes::AddArray,
+ theIntersection, theObj2VTKMap);
+ }
+
+ inline
+ void
+ DeepCopyDataSetField(vtkDataSet* theInput, const char* theFieldName, vtkDataSet* theOutput,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ DeepCopyField(theInput->GetPointData(), theFieldName, theOutput->GetPointData(),
+ theIntersection, theObj2VTKMap);
+ DeepCopyField(theInput->GetCellData(), theFieldName, theOutput->GetCellData(),
+ theIntersection, theObj2VTKMap);
+ }
+
+ inline
+ void
+ DeepCopyDataSetAttributes(VISU_MergeFilter *theFilter,
+ vtkDataSet *theFilterOutput, VISU::TFieldList* theFieldList,
+ const TSortedArray& theIntersection, const TId2IdMap& theObj2VTKMap)
+ {
+ if(vtkDataSet* aDataSet = theFilter->GetScalars())
+ DeepCopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetScalars,
+ theFilterOutput, &vtkDataSetAttributes::SetScalars,
+ theIntersection, theObj2VTKMap);
+
+ if(vtkDataSet* aDataSet = theFilter->GetVectors())
+ DeepCopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetVectors,
+ theFilterOutput, &vtkDataSetAttributes::SetVectors,
+ theIntersection, theObj2VTKMap);
+
+ if(vtkDataSet* aDataSet = theFilter->GetNormals())
+ DeepCopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetNormals,
+ theFilterOutput, &vtkDataSetAttributes::SetNormals,
+ theIntersection, theObj2VTKMap);
+
+ if(vtkDataSet* aDataSet = theFilter->GetTCoords())
+ DeepCopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetTCoords,
+ theFilterOutput, &vtkDataSetAttributes::SetTCoords,
+ theIntersection, theObj2VTKMap);
+
+ if(vtkDataSet* aDataSet = theFilter->GetTensors())
+ DeepCopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetTensors,
+ theFilterOutput, &vtkDataSetAttributes::SetTensors,
+ theIntersection, theObj2VTKMap);
+
+ VISU::TFieldListIterator anIter(theFieldList);
+ for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+ vtkDataSet *aDataSet = anIter.Get()->Ptr;
+ const char* aFieldName = anIter.Get()->GetName();
+ DeepCopyDataSetField(aDataSet, aFieldName, theFilterOutput,
+ theIntersection, theObj2VTKMap);
+ }
+ }
+}
+
+void VISU_MergeFilter::Execute()
+{
+ vtkUnstructuredGrid *anInput = this->GetInput();
+ vtkUnstructuredGrid *anOutput = this->GetOutput();
+
+ vtkCellData *aCellData = anInput->GetCellData();
+ vtkDataArray *aCellMapper = aCellData->GetArray("VISU_CELLS_MAPPER");
+ if(vtkIntArray *aGeometryCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper)){
+ TSortedArray aGeometryCellArray;
+ GetSortedArray(aGeometryCellMapper, aGeometryCellArray);
+ //cout<<aGeometryCellArray.size()<<endl;
+
+ vtkIntArray* aDataCellMapper = NULL;
+ VISU::TFieldListIterator anIter(this->FieldList);
+ for(anIter.Begin(); !anIter.End() ; anIter.Next()){
+ vtkCellData *aCellData = anIter.Get()->Ptr->GetCellData();
+ const char* aFieldName = anIter.Get()->GetName();
+ if(strcmp(aFieldName, "VISU_CELLS_MAPPER") == 0){
+ vtkDataArray *aCellMapper = aCellData->GetArray(aFieldName);
+ aDataCellMapper = dynamic_cast<vtkIntArray*>(aCellMapper);
+ break;
}
}
+ if(aDataCellMapper){
+ TSortedArray aDataCellArray;
+ GetSortedArray(aDataCellMapper, aDataCellArray);
+ //cout<<aDataCellArray.size()<<endl;
+
+ int aMaxLength = std::max(aGeometryCellArray.size(), aDataCellArray.size());
+ TSortedArray anIntersectionArray(aMaxLength);
+ TSortedArray::iterator anArrayIter = anIntersectionArray.begin();
+ anArrayIter = std::set_intersection(aGeometryCellArray.begin(),
+ aGeometryCellArray.end(),
+ aDataCellArray.begin(),
+ aDataCellArray.end(),
+ anArrayIter);
+
+ anIntersectionArray.erase(anArrayIter, anIntersectionArray.end());
+
+ //cout<<anIntersectionArray.size()<<endl<<endl;
- if ( this->GetTensors() )
- {
- pd = this->GetTensors()->GetPointData();
- tensors = pd->GetTensors();
- if ( tensors != NULL )
- {
- numTensors = tensors->GetNumberOfTuples();
- }
- cd = this->GetTensors()->GetCellData();
- cellTensors = cd->GetTensors();
- if ( cellTensors != NULL )
- {
- numCellTensors = cellTensors->GetNumberOfTuples();
+ bool anIsCompletelyCoincide =
+ anIntersectionArray.size() == aGeometryCellArray.size() &&
+ anIntersectionArray.size() == aDataCellArray.size();
+
+ if(!anIsCompletelyCoincide){
+ {
+ TId2IdMap anObj2VTKGeometryMap;
+ vtkIdType aNbCells = aGeometryCellMapper->GetNumberOfTuples();
+ for(int aCellId = 0; aCellId < aNbCells; aCellId++){
+ vtkIdType anObjID = aGeometryCellMapper->GetValue(aCellId);
+ anObj2VTKGeometryMap[anObjID] = aCellId;
+ }
+
+ vtkIdType aNbTuples = anIntersectionArray.size();
+ anOutput->Allocate(aNbTuples);
+ vtkIdList *aCellIds = vtkIdList::New();
+ for(int aTupleId = 0; aTupleId < aNbTuples; aTupleId++){
+ vtkIdType anObjID = anIntersectionArray[aTupleId];
+ vtkIdType aCellId = anObj2VTKGeometryMap[anObjID];
+ vtkCell *aCell = anInput->GetCell(aCellId);
+ aCellIds->Reset();
+ vtkIdType aNbPointIds = aCell->PointIds->GetNumberOfIds();
+ for(vtkIdType aPointId = 0; aPointId < aNbPointIds; aPointId++)
+ aCellIds->InsertNextId(aCell->GetPointIds()->GetId(aPointId));
+ anOutput->InsertNextCell(anInput->GetCellType(aCellId), aCellIds);
+ }
+ aCellIds->Delete();
+ anOutput->SetPoints(anInput->GetPoints());
+ }
+ {
+ TId2IdMap anObj2VTKDataMap;
+ vtkIdType aNbCells = aDataCellMapper->GetNumberOfTuples();
+ for(int aCellId = 0; aCellId < aNbCells; aCellId++){
+ vtkIdType anObjID = aDataCellMapper->GetValue(aCellId);
+ anObj2VTKDataMap[anObjID] = aCellId;
+ }
+
+ DeepCopyDataSetAttributes(this, anOutput, this->FieldList,
+ anIntersectionArray, anObj2VTKDataMap);
+ }
+ return;
}
}
+ }
- // merge data only if it is consistent
- if ( numPts == numScalars )
- {
- outputPD->SetScalars(scalars);
- }
- if ( numCells == numCellScalars )
- {
- outputCD->SetScalars(cellScalars);
- }
+ anOutput->CopyStructure(anInput);
+ this->BasicExecute(anOutput);
+}
- if ( numPts == numVectors )
- {
- outputPD->SetVectors(vectors);
- }
- if ( numCells == numCellVectors )
- {
- outputCD->SetVectors(cellVectors);
- }
-
- if ( numPts == numNormals )
- {
- outputPD->SetNormals(normals);
- }
- if ( numCells == numCellNormals )
- {
- outputCD->SetNormals(cellNormals);
+namespace
+{
+ inline
+ void
+ CopyAttribute(vtkDataSetAttributes* theInput, TGetAttribute theGetAttribute,
+ vtkDataSetAttributes* theOutput, TSetAttribute theSetAttribute,
+ vtkIdType theFixedNbTuples)
+ {
+ if(vtkDataArray *anAttribute = (theInput->*theGetAttribute)()){
+ vtkIdType aNbTuples = anAttribute->GetNumberOfTuples();
+ if(theFixedNbTuples == aNbTuples)
+ (theOutput->*theSetAttribute)(anAttribute);
}
+ }
- if ( numPts == numTCoords )
- {
- outputPD->SetTCoords(tcoords);
- }
- if ( numCells == numCellTCoords )
- {
- outputCD->SetTCoords(cellTCoords);
- }
+ inline
+ void
+ CopyDataSetAttribute(vtkDataSet *theInput, TGetAttribute theGetAttribute,
+ vtkDataSet *theOutput, TSetAttribute theSetAttribute,
+ vtkIdType theNbPoints, vtkIdType theNbCells)
+ {
+ CopyAttribute(theInput->GetPointData(), theGetAttribute,
+ theOutput->GetPointData(), theSetAttribute,
+ theNbPoints);
+ CopyAttribute(theInput->GetCellData(), theGetAttribute,
+ theOutput->GetCellData(), theSetAttribute,
+ theNbCells);
+ }
+}
- if ( numPts == numTensors )
- {
- outputPD->SetTensors(tensors);
- }
- if ( numCells == numCellTensors )
+void VISU_MergeFilter::BasicExecute(vtkDataSet *output)
+{
+ vtkIdType numPts, numCells;
+ vtkPointData *outputPD = output->GetPointData();
+ vtkCellData *outputCD = output->GetCellData();
+
+ vtkDebugMacro(<<"Merging data!");
+
+ if ( (numPts = output->GetNumberOfPoints()) < 1 )
{
- outputCD->SetTensors(cellTensors);
+ vtkWarningMacro(<<"Nothing to merge!");
}
+ numCells = output->GetNumberOfCells();
+
+ // merge data only if it is consistent
+ if(vtkDataSet* aDataSet = this->GetScalars())
+ CopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetScalars,
+ output, &vtkDataSetAttributes::SetScalars,
+ numPts, numCells);
+
+ if(vtkDataSet* aDataSet = this->GetVectors())
+ CopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetVectors,
+ output, &vtkDataSetAttributes::SetVectors,
+ numPts, numCells);
+
+ if(vtkDataSet* aDataSet = this->GetNormals())
+ CopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetNormals,
+ output, &vtkDataSetAttributes::SetNormals,
+ numPts, numCells);
+
+ if(vtkDataSet* aDataSet = this->GetTCoords())
+ CopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetTCoords,
+ output, &vtkDataSetAttributes::SetTCoords,
+ numPts, numCells);
+
+ if(vtkDataSet* aDataSet = this->GetTensors())
+ CopyDataSetAttribute(aDataSet, &vtkDataSetAttributes::GetTensors,
+ output, &vtkDataSetAttributes::SetTensors,
+ numPts, numCells);
VISU::TFieldListIterator it(this->FieldList);
vtkDataArray* da;
vtkIdType num;
for(it.Begin(); !it.End() ; it.Next())
{
- pd = it.Get()->Ptr->GetPointData();
- cd = it.Get()->Ptr->GetCellData();
+ vtkPointData *pd = it.Get()->Ptr->GetPointData();
+ vtkCellData *cd = it.Get()->Ptr->GetCellData();
name = it.Get()->GetName();
if ( (da=pd->GetArray(name)) )
{