public void configure(AnalyticPhantom phan, XRayDetector detector) throws Exception {
   this.detector = detector;
   this.detector.init();
   phantom = phan;
   if (phantom.getBackgroundMaterial() == null) {
     Material mat = null;
     String materialstr = "vacuum";
     mat = MaterialsDB.getMaterialWithName(materialstr);
     phantom.setBackground(mat);
   }
   rayTracer.setScene((PrioritizableScene) phantom);
   environment.setMaterial(phantom.getBackgroundMaterial());
   super.configure();
 }
 public SliceWorker clone() {
   AnalyticPhantomProjectorWorker newRend = new AnalyticPhantomProjectorWorker();
   newRend.phantom = phantom;
   newRend.detector = detector;
   newRend.environment.setMaterial(phantom.getBackgroundMaterial());
   newRend.rayTracer.setScene((PrioritizableScene) phantom);
   return newRend;
 }
  @Override
  public void configure() throws Exception {
    // We will now read this from the Configuration. The detector needs to be preconfigured!
    // detector = (XRayDetector) UserUtil.queryObject("Select Detector:", "Detector Selection",
    // XRayDetector.class);
    // detector.configure();
    detector = Configuration.getGlobalConfiguration().getDetector();
    detector.init();
    phantom = UserUtil.queryPhantom("Select Phantom", "Select Phantom");
    Material mat = null;

    do {
      String materialstr = UserUtil.queryString("Enter Background Medium:", "vacuum");
      mat = MaterialsDB.getMaterialWithName(materialstr);
    } while (mat == null);

    phantom.setBackground(mat);
    phantom.configure();

    rayTracer.setScene((PrioritizableScene) phantom);
    environment.setMaterial(phantom.getBackgroundMaterial());
    super.configure();
  }