Docstoc

ImageJ Command crawing

Document Sample
ImageJ Command crawing Powered By Docstoc
					                  ImageJ




ImageJ Diagrams

       2010
What is ImageJ ?


                 Application/GUI
                                                                                Extension Points
                  Menus/           WindowManager           Command
                  Commands                                 Recorder

                  ToolBar          ImageDisplay            Macros


                  StatusBar                                ROI




                                                                             Plugins API           Plugins
                         Data Structures
                                                                             Plugin
  I/O                         ImagePlus     ImageProcessor          Stacks
                                                                             PluginFrame
    Conversion


                                                                             GenericDialog


                         Image Processing

                              Adjust        Manipulation


                              Analysis      Measurement
Implementation

      Application    Events,
      Framework      Binding




Interface

      Display       Actions    Image     Persistence
      Component
      Interfaces




ImageJ API


Core/Library
                                  ImageData




SPI

       Plugin                          Image I/O
       Manager
Plugins




  Plugins Directory
  IJ.getDirectory("plugins")
  On startup: java -Dplugins.dir=/Users/wayne -cp ij.jar
  ij.ImageJ
Extending with Listeners…

                                                              ImageListener
                                                                                                      MacroExtension,
                                                                                                    ExtensionDescriptor
                                                                         CommandListener
                                      Component


                                                                                            (New listener)



                                                  FocusListener,
                                                                                 Frame
   MouseListener,                                 WindowListener,
                             Canvas               WindowStateListener,
   MouseMotionListener
                                                  MouseWheelListener




                                                                                               Runnable,
                                                                                               AdjustmentListener,
                                                                                               ActionListener,
                                                                                               MouseWheelListener
                   ImageCanvas                                ImageWindow




                                                                              StackWindow



                                                  ImageWindowPlus


                                                                                StackWindowPlus
              HandleExtraFileTypes
Objects in ImageJ
                                                 WindowManager
                                                 current
                                                 number
 Image                               AWT Image
  file

                                                                                                               Frame

                                                                                              ImageWindow

                                                                                         ImageWindow

                                                                                     ImageWindow
                   ImagePlus

                       ImageWindow

     expandable                                                                       ImageCanvas
                                                                                     Screen area for display
       array of
       images      ImageStack



                       Slice


                                                           StackWindow
 ImageProcessor    ImageProcessor

      pixels

                                                            ImageCanvas
                                                           Screen area for display

  snapShotPixels
ImageJ Classes
  ImageStack

                                                               ImagePlus
                                           width    image
                                           height
                                                    ip                    imageType
                                           pixels                                                    ImageWindow
                                           LUT      win                   (COLOR_256
                                           cm                             COLOR_RGB
                                                    title                 GRAY16
                                                                          GRAY32
                                                    Image                 GRAY8)                        ImageCanvas
                                                    Fileinfo

                                                    stack                      roi
                                                    stacksize
                                                    currentSlice



                          CompositeImage
 java.awt.Image

                                                                                                                        expandable
                                                                                                                      array of images




                                                                   ImageStack
                                                                                       ImageProcessor
                                                                                       ByteProcessor
                                                                                       ShortProcessor
                                                                       Slice           ColorProcessor
                                                                                       FloatProcessor                     array

                                                                     ImageProcessor
                                                                                       getPixels()
     Image File
    TIFF, BMP, DICOM,
 FITS, PGM, GIF or JPRG
ImagePlus Fields
 private
                                                                                                                         public static final int
 ImageJ ij = IJ.getInstance();                                          public boolean changes;                          GRAY8 = 0;
                                                                                                                         GRAY16 = 1;
 String title;
                                                                                                                         GRAY32 = 2;
 String url;
                                                                                                                         COLOR_256 = 3;
                                                                                                                         COLOR_RGB = 4;
 FileInfo fileInfo;
 Properties properties;
                                                                     protected
 ImageStack stack;                                                   Image img; (BufferedImage,   rendered, with a MemoryImageSource)

                                                                     ImageProcessor ip;
 (+ Dimensions
 (static final String[] orders =                                     ImageWindow win;
 {"xyczt(default)", "xyctz", "xyzct", "xyztc", "xytcz", "xytzc"};)

 int nSlices = 1;                                                    Roi roi;
 int nChannels = 1;                                                  int currentSlice;
 int nFrames = 1;                                                    static final int OPENED=0, CLOSED=1, UPDATED=2;
 int[] position = {1,1,1};                                           boolean compositeImage;
                                                                     int width;
 int imageType = GRAY8;                                              int height;
 int ID;                                                             boolean locked = false;

 int imageUpdateY, imageUpdateW;
 long startTime; // for operation duration
 Calibration calibration;                                            static
                                                                     int currentID = -1;
 boolean    imageLoaded;                                             Component comp;
                                                                     (NOTE use of prepareImage(),
 boolean    activated;                                               is this only for progress display?)
 boolean    ignoreFlush;
 boolean    errorLoadingImage;                                       Calibration globalCalibration;
 boolean    openAsHyperStack;
                                                                     ImagePlus clipboard;
 boolean noUpdateMode;
                                                                     Vector listeners = new Vector();
 ImageCanvas flatteningCanvas; (is this new?)
 Overlay overlay;
ImageStack fields

 static final
 int INITIAL_SIZE = 25;
 String outOfRange = "Argument out of range: ";




  private
  int nSlices = 0;
  Object[] stack;
                                                  no type
  String[] label;

  int width, height;

  Rectangle roi; (also in ImagePlus)

  ColorModel cm;

  double min=Double.MAX_VALUE;
  double max;

  float[] cTable;
ImageProcessor fields
 protected
                                                                    public static final
 int lineWidth = 1;
 int cx, cy; //current drawing coordinates
                                                                    int BLACK = 0xFF000000;
 Font font;
                                                                    double NO_THRESHOLD = -808080.0;
 FontMetrics fontMetrics;
                                                                    int LEFT_JUSTIFY = 0;
 boolean antialiasedText;
                                                                    int CENTER_JUSTIFY = 1;
 boolean boldFont;
                                                                    int RIGHT_JUSTIFY = 2;
                                                                    int ISODATA = 0;
 int   width, snapshotWidth;
                                                                    int ISODATA2 = 1;
 int   height, snapshotHeight;
                                                                    int NEAREST_NEIGHBOR=0, NONE=0, BILINEAR=1, BICUBIC=2;
 int   roiX, roiY, roiWidth, roiHeight;
                                                                    int BLUR_MORE=0, FIND_EDGES=1, MEDIAN_FILTER=2, MIN=3, MAX=4, CONVOLVE=5;
 int   xMin, xMax, yMin, yMax;
                                                                    int RED_LUT=0, BLACK_AND_WHITE_LUT=1, NO_LUT_UPDATE=2, OVER_UNDER_LUT=3;

 ColorModel baseCM; // base color model
                                                                    static final int INVERT=0, FILL=1, ADD=2, MULT=3, AND=4, OR=5,
 ColorModel cm;
                                                                    XOR=6, GAMMA=7, LOG=8, MINIMUM=9, MAXIMUM=10, SQR=11, SQRT=12,
 byte[] rLUT1, gLUT1, bLUT1; // base LUT
                                                                    EXP=13, ABS=14;
 byte[] rLUT2, gLUT2, bLUT2; // LUT as modified by setMinAndMax
                                                                    static final String WRONG_LENGTH = "width*height!=pixels.length";
 and setThreshold
 boolean interpolate; // replaced by interpolationMethod
 int interpolationMethod = NONE;
 double minThreshold=NO_THRESHOLD, maxThreshold=NO_THRESHOLD;
 int histogramSize = 256;                                           int fgColor = 0;
 double histogramMin, histogramMax;                                 boolean snapshotCopyMode;
 float[] cTable;
                                                                    ImageProcessor mask;
 boolean lutAnimation;
                                                                    ProgressBar progressBar;
 MemoryImageSource source;
 Image img;
 boolean newPixels;                                                 private static
 Color drawingColor = Color.black;                                  String[] interpolationMethods;
 int clipXMin, clipXMax, clipYMin, clipYMax; // clip rect used by   // Over/Under tresholding colors
 drawTo, drawLine, drawDot and drawPixel                            int overRed, overGreen=255, overBlue;
 int justification = LEFT_JUSTIFY;
                                                                    int underRed, underGreen, underBlue=255;
 int lutUpdateMode;
                                                                    boolean useBicubic;
 WritableRaster raster;
 BufferedImage image;
 BufferedImage fmImage;                                             private int sliceNumber;
 ColorModel cm2;
 SampleModel sampleModel;
 IndexColorModel defaultColorModel;
 boolean minMaxSet;
ij
ij.gui
Plugins - Related Classes & Execution Mechanisms

  ij.plugin.ClassChecker


         ij.io.PluginClassLoader

                                                                                   Why not
                                                                               extends Plugin?
                                                              PlugInFilter
                                   Plugin



             java.awt.Frame
                                                                                        invokes
                                                            ExtendedPlugInFilter

                                                                                                   PlugInFilterRunner
                             PlugInFrame




                                                                                      ij.Executer
                                                                                      runs the specified menu
                                                                                      command in a separate thread

            IJ.runPlugin()              IJ.runMacroFile()


            IJ.runUserPlugin()          IJ.runMacro()
                                                                                                                 extends
                                                                                                                     implements
                                             ij.macro.macroRunner
ij.process
ij.IO
ij.plugin.filter
ij.plugin.frame
ImageJ Class Hierarchy (GUI)
ImageJ…
IJ Classes
Important ImageJ Classes




  Graphics.
drawImage()
ImageJ Class Diagram
ImageJ Class Diagram
ImageJ Class Diagram
ImageJ Class Diagram
Yet another view…

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:47
posted:4/1/2011
language:English
pages:28