Plug-in CT MD.java
From MIPAV
Revision as of 22:42, 15 February 2012 by Angelfish100 (Talk)
PlugInCT_MD.java 1 import plugins.PlugInDialogCT_MT; //associated class file 2 import gov.nih.mipav.plugins.*; //needed to load PlugInAlgorithm / PlugInView / 3 //PlugInFile interface 4 import gov.nih.mipav.view.*; 5 import gov.nih.mipav.model.structures.*; 6 7 import java.awt.*; 8 9 /** 10 * This is a simple plugin for the University of Maryland to simple segment an 11 * imagebased on CT Hounsfield units. 12 * 13 * @see PlugInAlgorithm 14 */ 15 16 //This is an Algorithm type of PlugIn, and therefore must implement PlugInAlgorithm 17 //Implementing the PlugInAlgorithm requires this class to implement the run method 18 //with the correct parameters 19 public class PlugInCT_MD implements PlugInAlgorithm { 20 21 /** 22 * Defines body of run method, which was declared in the interface. 23 * @param UI User Interface 24 * @param parentFrame ParentFrame 25 * @param image Current ModelImage--this is an image already loaded into 26 * MIPAV. Can be null. 27 */ 28 public void run (ViewUserInterface UI, Frame parentFrame, ModelImage image){ 29 30 if (parentFrame instanceof ViewJFrameImage) 31 new PlugInDialogCT_MD (parentFrame,image); 32 33 else 34 MipavUtil.displayError ("PlugIn CT_MD only runs on an image frame."); 35 } 36 } 37 }
|