1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // SALOME OBJECT : kernel of SALOME component
23 // File : VTKViewer_GeometryFilter.cxx
24 // Author : Michael ZORIN
28 #include "VTKViewer_GeometryFilter.h"
29 #include "VTKViewer_ConvexTool.h"
31 #include <vtkSmartPointer.h>
32 #include <vtkCellArray.h>
33 #include <vtkCellData.h>
34 #include <vtkGenericCell.h>
35 #include <vtkHexahedron.h>
36 #include <vtkMergePoints.h>
37 #include <vtkObjectFactory.h>
38 #include <vtkPointData.h>
39 #include <vtkPolyData.h>
40 #include <vtkPyramid.h>
41 #include <vtkStructuredGrid.h>
43 #include <vtkUnsignedCharArray.h>
44 #include <vtkUnstructuredGrid.h>
47 #include <vtkInformationVector.h>
48 #include <vtkInformation.h>
62 //#define USE_ROBUST_TRIANGULATION
64 vtkCxxRevisionMacro(VTKViewer_GeometryFilter, "$Revision$");
65 vtkStandardNewMacro(VTKViewer_GeometryFilter);
67 VTKViewer_GeometryFilter
68 ::VTKViewer_GeometryFilter():
75 VTKViewer_GeometryFilter
76 ::~VTKViewer_GeometryFilter()
81 VTKViewer_GeometryFilter
83 vtkInformation *request,
84 vtkInformationVector **inputVector,
85 vtkInformationVector *outputVector)
87 // get the info objects
88 vtkInformation *inInfo = inputVector[0]->GetInformationObject(0);
89 vtkInformation *outInfo = outputVector->GetInformationObject(0);
91 // get the input and ouptut
92 vtkDataSet *input = vtkDataSet::SafeDownCast(
93 inInfo->Get(vtkDataObject::DATA_OBJECT()));
94 vtkPolyData *output = vtkPolyData::SafeDownCast(
95 outInfo->Get(vtkDataObject::DATA_OBJECT()));
97 vtkIdType numCells=input->GetNumberOfCells();
104 if (input->GetDataObjectType() == VTK_UNSTRUCTURED_GRID){
105 return this->UnstructuredGridExecute(input, output, outInfo);
107 return Superclass::RequestData(request,inputVector,outputVector);
114 VTKViewer_GeometryFilter
115 ::UnstructuredGridExecute(
116 vtkDataSet *dataSetInput,
118 vtkInformation *outInfo)
121 vtkUnstructuredGrid *input= (vtkUnstructuredGrid *)dataSetInput;
122 vtkCellArray *Connectivity = input->GetCells();
124 if ( Connectivity == NULL )
126 vtkDebugMacro(<<"Nothing to extract");
135 vtkPoints *p = input->GetPoints();
136 vtkIdType numCells=input->GetNumberOfCells();
137 vtkPointData *pd = input->GetPointData();
138 vtkCellData *cd = input->GetCellData();
139 vtkPointData *outputPD = output->GetPointData();
141 VTKViewer_OrderedTriangulator anOrderedTriangulator;
142 VTKViewer_DelaunayTriangulator aDelaunayTriangulator;
144 vtkCellData *outputCD = output->GetCellData();
145 vtkGenericCell *cell = vtkGenericCell::New();
147 vtkIdList *cellIds = vtkIdList::New();
148 vtkIdList *faceIds = vtkIdList::New();
152 int faceId, *faceVerts, numFacePts;
153 vtkFloatingPointType *x;
154 vtkIdType PixelConvert[4];
155 // Change the type from int to vtkIdType in order to avoid compilation errors while using VTK
156 // from ParaView-3.4.0 compiled on 64-bit Debian platform with VTK_USE_64BIT_IDS = ON
157 vtkIdType aNewPts[VTK_CELL_SIZE];
159 unsigned char updateLevel = (unsigned char)(output->GetUpdateGhostLevel());
160 unsigned char *cellGhostLevels = 0;
167 vtkDebugMacro(<<"Executing geometry filter for unstructured grid input");
169 vtkDataArray* temp = 0;
172 temp = cd->GetArray("vtkGhostLevels");
174 if ( (!temp) || (temp->GetDataType() != VTK_UNSIGNED_CHAR)
175 || (temp->GetNumberOfComponents() != 1))
177 vtkDebugMacro("No appropriate ghost levels field available.");
181 cellGhostLevels = ((vtkUnsignedCharArray*)temp)->GetPointer(0);
184 // Determine nature of what we have to do
185 if ( (!this->CellClipping) && (!this->PointClipping) &&
186 (!this->ExtentClipping) )
194 cellVis = new char[numCells];
197 // Just pass points through, never merge
198 output->SetPoints(input->GetPoints());
199 outputPD->PassData(pd);
201 outputCD->CopyAllocate(cd,numCells,numCells/2);
203 output->Allocate(numCells/4+1,numCells);
205 // Loop over the cells determining what's visible
208 for (cellId=0, Connectivity->InitTraversal();
209 Connectivity->GetNextCell(npts,pts);
213 if ( this->CellClipping && cellId < this->CellMinimum ||
214 cellId > this->CellMaximum )
220 for (i=0; i < npts; i++)
222 x = p->GetPoint(pts[i]);
223 if ( (this->PointClipping && (pts[i] < this->PointMinimum ||
224 pts[i] > this->PointMaximum) ) ||
225 (this->ExtentClipping &&
226 (x[0] < this->Extent[0] || x[0] > this->Extent[1] ||
227 x[1] < this->Extent[2] || x[1] > this->Extent[3] ||
228 x[2] < this->Extent[4] || x[2] > this->Extent[5] )) )
232 }//point/extent clipping
234 }//if point clipping needs checking
236 }//if not all visible
238 // Loop over all cells now that visibility is known
239 // (Have to compute visibility first for 3D cell boundarys)
240 int progressInterval = numCells/20 + 1;
242 myVTK2ObjIds.clear();
243 myVTK2ObjIds.reserve(numCells);
245 for (cellId=0, Connectivity->InitTraversal();
246 Connectivity->GetNextCell(npts,pts);
249 //Progress and abort method support
250 if ( !(cellId % progressInterval) )
252 vtkDebugMacro(<<"Process cell #" << cellId);
253 this->UpdateProgress ((float)cellId/numCells);
256 // Handle ghost cells here. Another option was used cellVis array.
257 if (cellGhostLevels && cellGhostLevels[cellId] > updateLevel)
258 { // Do not create surfaces in outer ghost cells.
262 if (allVisible || cellVis[cellId]) //now if visible extract geometry
264 //special code for nonlinear cells - rarely occurs, so right now it
266 vtkIdType aCellType = input->GetCellType(cellId);
273 case VTK_POLY_VERTEX:
274 newCellId = output->InsertNextCell(aCellType,npts,pts);
276 myVTK2ObjIds.push_back(cellId); //apo
278 outputCD->CopyData(cd,cellId,newCellId);
283 newCellId = output->InsertNextCell(aCellType,npts,pts);
285 myVTK2ObjIds.push_back(cellId);
286 outputCD->CopyData(cd,cellId,newCellId);
292 newCellId = output->InsertNextCell(aCellType,npts,pts);
294 myVTK2ObjIds.push_back(cellId);
295 outputCD->CopyData(cd,cellId,newCellId);
298 case VTK_TRIANGLE_STRIP:
299 newCellId = output->InsertNextCell(aCellType,npts,pts);
301 myVTK2ObjIds.push_back(cellId);
302 outputCD->CopyData(cd,cellId,newCellId);
306 newCellId = output->InsertNextCell(aCellType,npts,pts);
308 myVTK2ObjIds.push_back(cellId);
309 outputCD->CopyData(cd,cellId,newCellId);
312 case VTK_CONVEX_POINT_SET: {
313 bool anIsOk = anOrderedTriangulator.Execute(input,
325 aDelaunayTriangulator.Execute(input,
340 for (faceId = 0; faceId < 4; faceId++)
343 faceVerts = vtkTetra::GetFaceArray(faceId);
344 faceIds->InsertNextId(pts[faceVerts[0]]);
345 faceIds->InsertNextId(pts[faceVerts[1]]);
346 faceIds->InsertNextId(pts[faceVerts[2]]);
347 aCellType = VTK_TRIANGLE;
349 input->GetCellNeighbors(cellId, faceIds, cellIds);
350 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
351 (!allVisible && !cellVis[cellIds->GetId(0)]) )
353 for ( i=0; i < numFacePts; i++)
354 aNewPts[i] = pts[faceVerts[i]];
355 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
357 myVTK2ObjIds.push_back(cellId);
358 outputCD->CopyData(cd,cellId,newCellId);
364 for (faceId = 0; faceId < 6; faceId++)
367 faceVerts = vtkVoxel::GetFaceArray(faceId);
368 faceIds->InsertNextId(pts[faceVerts[0]]);
369 faceIds->InsertNextId(pts[faceVerts[1]]);
370 faceIds->InsertNextId(pts[faceVerts[2]]);
371 faceIds->InsertNextId(pts[faceVerts[3]]);
372 aCellType = VTK_QUAD;
374 input->GetCellNeighbors(cellId, faceIds, cellIds);
375 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
376 (!allVisible && !cellVis[cellIds->GetId(0)]) )
378 for ( i=0; i < numFacePts; i++)
379 aNewPts[i] = pts[faceVerts[PixelConvert[i]]];
380 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
382 myVTK2ObjIds.push_back(cellId);
383 outputCD->CopyData(cd,cellId,newCellId);
388 case VTK_HEXAHEDRON: {
389 for (faceId = 0; faceId < 6; faceId++)
392 faceVerts = vtkHexahedron::GetFaceArray(faceId);
393 faceIds->InsertNextId(pts[faceVerts[0]]);
394 faceIds->InsertNextId(pts[faceVerts[1]]);
395 faceIds->InsertNextId(pts[faceVerts[2]]);
396 faceIds->InsertNextId(pts[faceVerts[3]]);
397 aCellType = VTK_QUAD;
399 input->GetCellNeighbors(cellId, faceIds, cellIds);
400 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
401 (!allVisible && !cellVis[cellIds->GetId(0)]) )
403 for ( i=0; i < numFacePts; i++)
404 aNewPts[i] = pts[faceVerts[i]];
405 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
407 myVTK2ObjIds.push_back(cellId);
408 outputCD->CopyData(cd,cellId,newCellId);
414 for (faceId = 0; faceId < 5; faceId++)
417 faceVerts = vtkWedge::GetFaceArray(faceId);
418 faceIds->InsertNextId(pts[faceVerts[0]]);
419 faceIds->InsertNextId(pts[faceVerts[1]]);
420 faceIds->InsertNextId(pts[faceVerts[2]]);
421 aCellType = VTK_TRIANGLE;
423 if (faceVerts[3] >= 0)
425 faceIds->InsertNextId(pts[faceVerts[3]]);
426 aCellType = VTK_QUAD;
429 input->GetCellNeighbors(cellId, faceIds, cellIds);
430 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
431 (!allVisible && !cellVis[cellIds->GetId(0)]) )
433 for ( i=0; i < numFacePts; i++)
434 aNewPts[i] = pts[faceVerts[i]];
435 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
437 myVTK2ObjIds.push_back(cellId);
438 outputCD->CopyData(cd,cellId,newCellId);
444 for (faceId = 0; faceId < 5; faceId++)
447 faceVerts = vtkPyramid::GetFaceArray(faceId);
448 faceIds->InsertNextId(pts[faceVerts[0]]);
449 faceIds->InsertNextId(pts[faceVerts[1]]);
450 faceIds->InsertNextId(pts[faceVerts[2]]);
451 aCellType = VTK_TRIANGLE;
453 if (faceVerts[3] >= 0)
455 faceIds->InsertNextId(pts[faceVerts[3]]);
456 aCellType = VTK_QUAD;
459 input->GetCellNeighbors(cellId, faceIds, cellIds);
460 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ||
461 (!allVisible && !cellVis[cellIds->GetId(0)]) )
463 for ( i=0; i < numFacePts; i++)
464 aNewPts[i] = pts[faceVerts[i]];
465 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
467 myVTK2ObjIds.push_back(cellId);
468 outputCD->CopyData(cd,cellId,newCellId);
474 case VTK_QUADRATIC_EDGE:
475 case VTK_QUADRATIC_TRIANGLE:
476 case VTK_QUADRATIC_QUAD:
477 case VTK_QUADRATIC_TETRA:
478 case VTK_QUADRATIC_HEXAHEDRON:
479 case VTK_QUADRATIC_WEDGE:
480 case VTK_QUADRATIC_PYRAMID:
481 if(!myIsWireframeMode){
482 input->GetCell(cellId,cell);
483 vtkIdList *pts = vtkIdList::New();
484 vtkPoints *coords = vtkPoints::New();
485 vtkIdList *cellIds = vtkIdList::New();
488 if ( cell->GetCellDimension() == 1 ) {
489 aCellType = VTK_LINE;
491 cell->Triangulate(0,pts,coords);
492 for (i=0; i < pts->GetNumberOfIds(); i+=2) {
493 aNewPts[0] = pts->GetId(i);
494 aNewPts[1] = pts->GetId(i+1);
495 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
497 myVTK2ObjIds.push_back(cellId);
498 outputCD->CopyData(cd,cellId,newCellId);
501 else if ( cell->GetCellDimension() == 2 ) {
502 aCellType = VTK_TRIANGLE;
504 cell->Triangulate(0,pts,coords);
505 for (i=0; i < pts->GetNumberOfIds(); i+=3) {
506 aNewPts[0] = pts->GetId(i);
507 aNewPts[1] = pts->GetId(i+1);
508 aNewPts[2] = pts->GetId(i+2);
509 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
511 myVTK2ObjIds.push_back(cellId);
512 outputCD->CopyData(cd,cellId,newCellId);
515 else //3D nonlinear cell
517 aCellType = VTK_TRIANGLE;
519 for (int j=0; j < cell->GetNumberOfFaces(); j++){
520 vtkCell *face = cell->GetFace(j);
521 input->GetCellNeighbors(cellId, face->PointIds, cellIds);
522 if ( cellIds->GetNumberOfIds() <= 0 || myShowInside ) {
523 face->Triangulate(0,pts,coords);
524 for (i=0; i < pts->GetNumberOfIds(); i+=3) {
525 aNewPts[0] = pts->GetId(i);
526 aNewPts[1] = pts->GetId(i+1);
527 aNewPts[2] = pts->GetId(i+2);
528 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
530 myVTK2ObjIds.push_back(cellId);
531 outputCD->CopyData(cd,cellId,newCellId);
542 case VTK_QUADRATIC_EDGE: {
543 aCellType = VTK_POLY_LINE;
550 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
552 myVTK2ObjIds.push_back(cellId);
554 outputCD->CopyData(cd,cellId,newCellId);
557 case VTK_QUADRATIC_TRIANGLE: {
558 aCellType = VTK_POLYGON;
568 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
570 myVTK2ObjIds.push_back(cellId);
572 outputCD->CopyData(cd,cellId,newCellId);
575 case VTK_QUADRATIC_QUAD: {
576 aCellType = VTK_POLYGON;
588 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
590 myVTK2ObjIds.push_back(cellId);
592 outputCD->CopyData(cd,cellId,newCellId);
595 case VTK_QUADRATIC_TETRA: {
596 aCellType = VTK_POLYGON;
599 //---------------------------------------------------------------
607 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
609 myVTK2ObjIds.push_back(cellId);
611 outputCD->CopyData(cd,cellId,newCellId);
613 //---------------------------------------------------------------
621 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
623 myVTK2ObjIds.push_back(cellId);
625 outputCD->CopyData(cd,cellId,newCellId);
627 //---------------------------------------------------------------
635 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
637 myVTK2ObjIds.push_back(cellId);
639 outputCD->CopyData(cd,cellId,newCellId);
641 //---------------------------------------------------------------
649 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
651 myVTK2ObjIds.push_back(cellId);
653 outputCD->CopyData(cd,cellId,newCellId);
657 case VTK_QUADRATIC_WEDGE: {
658 aCellType = VTK_POLYGON;
660 //---------------------------------------------------------------
668 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
670 myVTK2ObjIds.push_back(cellId);
671 outputCD->CopyData(cd,cellId,newCellId);
673 //---------------------------------------------------------------
678 aNewPts[3] = pts[10];
680 aNewPts[5] = pts[11];
681 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
683 myVTK2ObjIds.push_back(cellId);
684 outputCD->CopyData(cd,cellId,newCellId);
686 //---------------------------------------------------------------
692 aNewPts[3] = pts[14];
694 aNewPts[5] = pts[11];
696 aNewPts[7] = pts[12];
697 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
699 myVTK2ObjIds.push_back(cellId);
700 outputCD->CopyData(cd,cellId,newCellId);
702 //---------------------------------------------------------------
705 aNewPts[1] = pts[13];
707 aNewPts[3] = pts[10];
709 aNewPts[5] = pts[14];
712 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
714 myVTK2ObjIds.push_back(cellId);
715 outputCD->CopyData(cd,cellId,newCellId);
717 //---------------------------------------------------------------
720 aNewPts[1] = pts[12];
724 aNewPts[5] = pts[13];
727 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
729 myVTK2ObjIds.push_back(cellId);
730 outputCD->CopyData(cd,cellId,newCellId);
733 case VTK_QUADRATIC_HEXAHEDRON: {
734 aCellType = VTK_POLYGON;
737 //---------------------------------------------------------------
741 aNewPts[3] = pts[17];
743 aNewPts[5] = pts[12];
745 aNewPts[7] = pts[16];
747 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
749 myVTK2ObjIds.push_back(cellId);
751 outputCD->CopyData(cd,cellId,newCellId);
753 //---------------------------------------------------------------
757 aNewPts[3] = pts[18];
759 aNewPts[5] = pts[13];
761 aNewPts[7] = pts[17];
763 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
765 myVTK2ObjIds.push_back(cellId);
767 outputCD->CopyData(cd,cellId,newCellId);
769 //---------------------------------------------------------------
771 aNewPts[1] = pts[10];
773 aNewPts[3] = pts[19];
775 aNewPts[5] = pts[14];
777 aNewPts[7] = pts[18];
779 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
781 myVTK2ObjIds.push_back(cellId);
783 outputCD->CopyData(cd,cellId,newCellId);
785 //---------------------------------------------------------------
787 aNewPts[1] = pts[11];
789 aNewPts[3] = pts[16];
791 aNewPts[5] = pts[15];
793 aNewPts[7] = pts[19];
795 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
797 myVTK2ObjIds.push_back(cellId);
799 outputCD->CopyData(cd,cellId,newCellId);
801 //---------------------------------------------------------------
807 aNewPts[5] = pts[10];
809 aNewPts[7] = pts[11];
811 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
813 myVTK2ObjIds.push_back(cellId);
815 outputCD->CopyData(cd,cellId,newCellId);
817 //---------------------------------------------------------------
819 aNewPts[1] = pts[12];
821 aNewPts[3] = pts[13];
823 aNewPts[5] = pts[14];
825 aNewPts[7] = pts[15];
827 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
829 myVTK2ObjIds.push_back(cellId);
831 outputCD->CopyData(cd,cellId,newCellId);
835 case VTK_QUADRATIC_PYRAMID: {
836 aCellType = VTK_POLYGON;
839 //---------------------------------------------------------------
843 aNewPts[3] = pts[12];
847 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
849 myVTK2ObjIds.push_back(cellId);
851 outputCD->CopyData(cd,cellId,newCellId);
853 //---------------------------------------------------------------
857 aNewPts[3] = pts[10];
861 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
863 myVTK2ObjIds.push_back(cellId);
865 outputCD->CopyData(cd,cellId,newCellId);
867 //---------------------------------------------------------------
869 aNewPts[1] = pts[10];
871 aNewPts[3] = pts[11];
875 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
877 myVTK2ObjIds.push_back(cellId);
879 outputCD->CopyData(cd,cellId,newCellId);
881 //---------------------------------------------------------------
883 aNewPts[1] = pts[11];
885 aNewPts[3] = pts[12];
889 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
891 myVTK2ObjIds.push_back(cellId);
893 outputCD->CopyData(cd,cellId,newCellId);
895 //---------------------------------------------------------------
906 newCellId = output->InsertNextCell(aCellType,numFacePts,aNewPts);
908 myVTK2ObjIds.push_back(cellId);
910 outputCD->CopyData(cd,cellId,newCellId);
921 vtkDebugMacro(<<"Extracted " << input->GetNumberOfPoints() << " points,"
922 << output->GetNumberOfCells() << " cells.");
939 VTKViewer_GeometryFilter
940 ::SetInside(int theShowInside)
942 if(myShowInside == theShowInside)
945 myShowInside = theShowInside;
950 VTKViewer_GeometryFilter
958 VTKViewer_GeometryFilter
959 ::SetWireframeMode(int theIsWireframeMode)
961 if(myIsWireframeMode == theIsWireframeMode)
964 myIsWireframeMode = theIsWireframeMode;
969 VTKViewer_GeometryFilter
972 return myIsWireframeMode;
977 VTKViewer_GeometryFilter
978 ::SetStoreMapping(int theStoreMapping)
980 if(myStoreMapping == theStoreMapping)
983 myStoreMapping = theStoreMapping;
988 VTKViewer_GeometryFilter
991 return myStoreMapping;
995 vtkIdType VTKViewer_GeometryFilter::GetElemObjId( int theVtkID )
997 if( myVTK2ObjIds.empty() || theVtkID > (int)myVTK2ObjIds.size() )
999 #if defined __GNUC_2__
1000 return myVTK2ObjIds[theVtkID];
1002 return myVTK2ObjIds.at(theVtkID);