///<summary>Deletes all static objects created</summary>
 public static void deleteAllVTKObjects()
 {
     //clean up vtk objects
     if (image1 != null)
     {
         image1.Dispose();
     }
     if (piw != null)
     {
         piw.Dispose();
     }
     if (viewer != null)
     {
         viewer.Dispose();
     }
 }
 ///<summary>Deletes all static objects created</summary>
 public static void deleteAllVTKObjects()
 {
     //clean up vtk objects
     if (image1 != null)
     {
         image1.Dispose();
     }
     if (sp != null)
     {
         sp.Dispose();
     }
     if (luminance != null)
     {
         luminance.Dispose();
     }
     if (tiff1 != null)
     {
         tiff1.Dispose();
     }
     if (tiff2 != null)
     {
         tiff2.Dispose();
     }
     if (bmp1 != null)
     {
         bmp1.Dispose();
     }
     if (bmp2 != null)
     {
         bmp2.Dispose();
     }
     if (pnm1 != null)
     {
         pnm1.Dispose();
     }
     if (pnm2 != null)
     {
         pnm2.Dispose();
     }
     if (psw1 != null)
     {
         psw1.Dispose();
     }
     if (psw2 != null)
     {
         psw2.Dispose();
     }
     if (pngw1 != null)
     {
         pngw1.Dispose();
     }
     if (pngw2 != null)
     {
         pngw2.Dispose();
     }
     if (jpgw1 != null)
     {
         jpgw1.Dispose();
     }
     if (jpgw2 != null)
     {
         jpgw2.Dispose();
     }
     if (viewer != null)
     {
         viewer.Dispose();
     }
 }