DistanceMap2DPlugin.java

Go to the documentation of this file.
00001 package theba.plugins;
00002 
00003 import theba.core.ImageFunctions;
00004 import theba.core.Plugin;
00005 import theba.core.Stack;
00006 import theba.core.gui.ThebaGUI;
00007 
00008 public class DistanceMap2DPlugin implements Plugin {
00009 
00010         ThebaGUI control;
00011 
00012         public void setup(ThebaGUI f) {
00013                 this.control = f;
00014         }
00015 
00016         public void process(Stack stack) {
00017                 for (int z = 0; z < stack.getDepth(); z++) {
00018                         control.setProgress(z);
00019                         if (control.isStopped())
00020                                 return;
00021                         stack.putSlice(ImageFunctions.distance2d(stack.getSlice(z), stack
00022                                         .getWidth(), stack.getHeight()), z);
00023                 }
00024         }
00025 
00026         public String getName() {
00027                 return "2D Distancemap";
00028         }
00029 
00030         public String getAbout() {
00031                 return null;
00032         }
00033 
00034         public String getCategory() {
00035                 return null;
00036         }
00037 }

Generated on Fri Nov 13 08:57:07 2009 for Theba by  doxygen 1.6.1