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();
        }
Exemple #2
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();
     }
 }