from java.lang import Runnable
from javax.swing import SwingUtilities
import time

class GuiWorker2(Runnable):
   def __init__(self, index):
       self.index = index

   def run(self):
      isoLevel.setLevel(level_start + (self.index*step))
      pipeLineManager.getCassandraView().rotate(.2,0);

      filePath = outputImageBasePath
      if(i>99):
          filePath += `self.index`
      elif(i>9):  
          filePath += "0" + `self.index`
      else:
          filePath += "00" + `self.index`
        
      #view.HardCopy(filePath+".tiff", 1);

for i in xrange(nbStep):
    SwingUtilities.invokeAndWait(GuiWorker2(i))


