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 DilatePlugin implements Plugin { 00009 ThebaGUI control; 00010 00011 public void setup(ThebaGUI f) { 00012 this.control = f; 00013 } 00014 00015 public String getCategory() { 00016 return "Morphology"; 00017 } 00018 00019 public void process(Stack stack) { 00020 for (int z = 0; z < stack.getDepth(); z++) { 00021 control.setProgress(z); 00022 stack.putSlice(ImageFunctions.dilate(stack.getSlice(z), stack 00023 .getWidth(), stack.getHeight()), z); 00024 } 00025 } 00026 00027 public String getName() { 00028 return "Dilate 2D"; 00029 } 00030 00031 public String getAbout() { 00032 return "Returns a 2D dilation of each slice on the entire stack"; 00033 } 00034 }