Ejemplo n.º 1
0
        public void RemoveMe()
        {
            if (actor != null)
            {
                _renderer.RemoveActor(actor);

                if (reader != null)
                {
                    reader.Dispose();
                }
                PolyData.Dispose();
                _polyDataMapper.Dispose();
                actor.Dispose();
            }
            actor = null;
        }
Ejemplo n.º 2
0
        public void RemoveMe()
        {
            if (centerLineActor != null)
            {
                renderer.RemoveActor(centerLineActor);
                centerLineActor.Dispose();
                centerLineActor = null;
            }

            _cleanFilter.Dispose();
            _profileTubes.Dispose();
            _profileData.Dispose();
            _lines.Dispose();
            _points.Dispose();
            this._mapper.Dispose();
        }
Ejemplo n.º 3
0
        public static List <List <double[]> > ReadPolyDataList(this string vtpFileName)
        {
            vtkPolyData polyData = ReadPolyData(vtpFileName);

            List <List <double[]> > ret = new List <List <double[]> >();

            for (int cellIdx = 0; cellIdx < polyData.GetNumberOfCells(); ++cellIdx)
            {
                List <double[]> list = new List <double[]>();
                ret.Add(list);

                vtkCell cell = polyData.GetCell(cellIdx);
                for (int i = 0; i < cell.GetNumberOfPoints(); ++i)
                {
                    list.Add(cell.GetPoints().GetPoint(i));
                }
            }

            polyData.Dispose();

            return(ret);
        }
Ejemplo n.º 4
0
 ///<summary>Deletes all static objects created</summary>
 public static void deleteAllVTKObjects()
 {
     //clean up vtk objects
     if (math != null)
     {
         math.Dispose();
     }
     if (points != null)
     {
         points.Dispose();
     }
     if (profile != null)
     {
         profile.Dispose();
     }
     if (del != null)
     {
         del.Dispose();
     }
     if (mapMesh != null)
     {
         mapMesh.Dispose();
     }
     if (meshActor != null)
     {
         meshActor.Dispose();
     }
     if (extract != null)
     {
         extract.Dispose();
     }
     if (tubes != null)
     {
         tubes.Dispose();
     }
     if (mapEdges != null)
     {
         mapEdges.Dispose();
     }
     if (edgeActor != null)
     {
         edgeActor.Dispose();
     }
     if (ball != null)
     {
         ball.Dispose();
     }
     if (balls != null)
     {
         balls.Dispose();
     }
     if (mapBalls != null)
     {
         mapBalls.Dispose();
     }
     if (ballActor != null)
     {
         ballActor.Dispose();
     }
     if (ren1 != null)
     {
         ren1.Dispose();
     }
     if (renWin != null)
     {
         renWin.Dispose();
     }
     if (iren != null)
     {
         iren.Dispose();
     }
 }
 ///<summary>Deletes all static objects created</summary>
 public static void deleteAllVTKObjects()
 {
     //clean up vtk objects
     if (pl3d != null)
     {
         pl3d.Dispose();
     }
     if (lineWidget != null)
     {
         lineWidget.Dispose();
     }
     if (seeds != null)
     {
         seeds.Dispose();
     }
     if (rk4 != null)
     {
         rk4.Dispose();
     }
     if (streamer != null)
     {
         streamer.Dispose();
     }
     if (rf != null)
     {
         rf.Dispose();
     }
     if (streamMapper != null)
     {
         streamMapper.Dispose();
     }
     if (streamline != null)
     {
         streamline.Dispose();
     }
     if (lineWidget2 != null)
     {
         lineWidget2.Dispose();
     }
     if (seeds2 != null)
     {
         seeds2.Dispose();
     }
     if (streamer2 != null)
     {
         streamer2.Dispose();
     }
     if (rf2 != null)
     {
         rf2.Dispose();
     }
     if (streamMapper2 != null)
     {
         streamMapper2.Dispose();
     }
     if (streamline2 != null)
     {
         streamline2.Dispose();
     }
     if (outline != null)
     {
         outline.Dispose();
     }
     if (outlineMapper != null)
     {
         outlineMapper.Dispose();
     }
     if (outlineActor != null)
     {
         outlineActor.Dispose();
     }
     if (ren1 != null)
     {
         ren1.Dispose();
     }
     if (renWin != null)
     {
         renWin.Dispose();
     }
     if (iren != null)
     {
         iren.Dispose();
     }
     if (cam1 != null)
     {
         cam1.Dispose();
     }
 }
Ejemplo n.º 6
0
 ///<summary>Deletes all static objects created</summary>
 public static void deleteAllVTKObjects()
 {
     //clean up vtk objects
     if (ren1 != null)
     {
         ren1.Dispose();
     }
     if (renWin != null)
     {
         renWin.Dispose();
     }
     if (iren != null)
     {
         iren.Dispose();
     }
     if (math != null)
     {
         math.Dispose();
     }
     if (aKSplineX != null)
     {
         aKSplineX.Dispose();
     }
     if (aKSplineY != null)
     {
         aKSplineY.Dispose();
     }
     if (aKSplineZ != null)
     {
         aKSplineZ.Dispose();
     }
     if (aCSplineX != null)
     {
         aCSplineX.Dispose();
     }
     if (aCSplineY != null)
     {
         aCSplineY.Dispose();
     }
     if (aCSplineZ != null)
     {
         aCSplineZ.Dispose();
     }
     if (inputPoints != null)
     {
         inputPoints.Dispose();
     }
     if (inputData != null)
     {
         inputData.Dispose();
     }
     if (balls != null)
     {
         balls.Dispose();
     }
     if (glyphPoints != null)
     {
         glyphPoints.Dispose();
     }
     if (glyphMapper != null)
     {
         glyphMapper.Dispose();
     }
     if (glyph != null)
     {
         glyph.Dispose();
     }
     if (Kpoints != null)
     {
         Kpoints.Dispose();
     }
     if (Cpoints != null)
     {
         Cpoints.Dispose();
     }
     if (profileKData != null)
     {
         profileKData.Dispose();
     }
     if (profileCData != null)
     {
         profileCData.Dispose();
     }
     if (lines != null)
     {
         lines.Dispose();
     }
     if (profileKTubes != null)
     {
         profileKTubes.Dispose();
     }
     if (profileKMapper != null)
     {
         profileKMapper.Dispose();
     }
     if (profileK != null)
     {
         profileK.Dispose();
     }
     if (profileCTubes != null)
     {
         profileCTubes.Dispose();
     }
     if (profileCMapper != null)
     {
         profileCMapper.Dispose();
     }
     if (profileC != null)
     {
         profileC.Dispose();
     }
 }