return myOut2InId[theOutId];
}
-vtkIdType VTKViewer_ExtractUnstructuredGrid::GetOutputId(int theInId) const{
- if(myCellIds.empty() && myCellTypes.empty()) return theInId;
- TMapId::const_iterator anIter = myIn2OutId.find(theInId);
- if(anIter == myIn2OutId.end()) return -1;
- return anIter->second;
-}
+// vtkIdType VTKViewer_ExtractUnstructuredGrid::GetOutputId(int theInId) const{
+// if(myCellIds.empty() && myCellTypes.empty()) return theInId;
+// TMapId::const_iterator anIter = myIn2OutId.find(theInId);
+// if(anIter == myIn2OutId.end()) return -1;
+// return anIter->second;
+// }
inline int InsertCell(vtkUnstructuredGrid *theInput,
vtkIdList *theIdList,
bool theStoreMapping,
vtkIdType theOutId,
- VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
- VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
+ VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
+ VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
{
vtkCell *aCell = theInput->GetCell(theCellId);
vtkIdList *aPntIds = aCell->GetPointIds();
/*vtkIdType anID = */theCellTypesArray->InsertNextValue(aCellType);
if(theStoreMapping){
theOut2InId.push_back( theCellId );
- theIn2OutId.insert( theIn2OutId.end(), std::make_pair( theCellId, theOutId ));
+ //theIn2OutId.insert( theIn2OutId.end(), std::make_pair( theCellId, theOutId ));
}
return aCellId;
}
vtkIdList *theIdList,
bool theStoreMapping,
vtkIdType theOutId,
- VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId,
- VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId)
+ VTKViewer_ExtractUnstructuredGrid::TVectorId& theOut2InId/*,
+ VTKViewer_ExtractUnstructuredGrid::TMapId& theIn2OutId*/)
{
theIdList->SetId(0,theCellId);
theConnectivity->InsertNextCell(theIdList);
theCellTypesArray->InsertNextValue(VTK_VERTEX);
if(theStoreMapping){
theOut2InId.push_back(theCellId);
- theIn2OutId.insert( theIn2OutId.end(), std::make_pair( theCellId, theOutId ));
+ //theIn2OutId.insert( theIn2OutId.end(), std::make_pair( theCellId, theOutId ));
}
}
//vtkUnstructuredGrid *anInput = this->GetInput();
//vtkUnstructuredGrid *anOutput = this->GetOutput();
-
- myOut2InId.clear(); myIn2OutId.clear();
+
+ myOut2InId.clear(); //myIn2OutId.clear();
// use a vector of cellTypes to avoid searching in myCellTypes map
// for a better performance (IPAL53103)
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
if(myStoreMapping){
myOut2InId.push_back(aCellId);
- myIn2OutId.insert( myIn2OutId.end(), std::make_pair( aCellId, anOutId ));
+ //myIn2OutId.insert( myIn2OutId.end(), std::make_pair( aCellId, anOutId ));
}
}
}
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
if(myCellIds.find(aCellId) != myCellIds.end()){
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
if(myCellIds.find(aCellId) == myCellIds.end()){
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
vtkIdType aType = anInput->GetCellType(aCellId);
if ( cellTypesVec[ aType ] == aType ) {
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
vtkIdType aType = anInput->GetCellType(aCellId);
if ( cellTypesVec[ aType ] != aType ) {
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
if ( cellTypesVec[ aType ] == aType ) {
if(myCellIds.find(aCellId) != myCellIds.end()){
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
if ( cellTypesVec[ aType ] != aType ) {
if(myCellIds.find(aCellId) == myCellIds.end()){
vtkIdType newId = InsertCell(anInput,aConnectivity,aCellTypesArray,newFaces,newFaceLocations,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
anOutput->GetCellData()->CopyData(anInput->GetCellData(),aCellId,newId);
}
}
if(myStoreMapping) myOut2InId.reserve(aNbElems);
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}else if(!myCellIds.empty() && myCellTypes.empty()){
if(myStoreMapping) myOut2InId.reserve(myCellIds.size());
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
if(myCellIds.find(aCellId) != myCellIds.end()){
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}else{
for(vtkIdType aCellId = 0, anOutId = 0; aCellId < aNbElems; aCellId++,anOutId++){
if(myCellIds.find(aCellId) == myCellIds.end()){
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}
vtkIdType aType = anInput->GetCellType(aCellId);
if ( cellTypesVec[ aType ] == aType ) {
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}else{
vtkIdType aType = anInput->GetCellType(aCellId);
if ( cellTypesVec[ aType ] != aType ) {
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}
if ( cellTypesVec[ aType ] == aType ) {
if(myCellIds.find(aCellId) != myCellIds.end()){
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}
if ( cellTypesVec[ aType ] != aType ) {
if(myCellIds.find(aCellId) == myCellIds.end()){
InsertPointCell(aConnectivity,aCellTypesArray,aCellId,anIdList,
- myStoreMapping,anOutId,myOut2InId,myIn2OutId);
+ myStoreMapping,anOutId,myOut2InId/*,myIn2OutId*/);
}
}
}