preprocessing
Class PreProcessingImageToolkit

java.lang.Object
  extended by preprocessing.PreProcessingImageToolkit
All Implemented Interfaces:
PreProcessingConstants

public class PreProcessingImageToolkit
extends java.lang.Object
implements PreProcessingConstants

This class contains the functionality of the preprocessing section


Field Summary
static java.lang.String DEFAULT_IMAGE
           
 
Fields inherited from interface preprocessing.PreProcessingConstants
EDGEMODE_CANNYDERICHEFILTER, EDGEMODE_LAPLACEFILTER, EDGEMODE_NO, EDGEMODE_SOBELOPERATOR, GREYSCALEMODE_B, GREYSCALEMODE_G, GREYSCALEMODE_MEAN, GREYSCALEMODE_R, STEP_EDGEDETECTION, STEP_GREYSCALE, STEP_ORIGINAL, STEP_THRESHOLD
 
Constructor Summary
PreProcessingImageToolkit()
          standard constructor
PreProcessingImageToolkit(java.net.URL url)
          standard constructor
 
Method Summary
 ij.process.ImageProcessor edgeDetection(ij.process.ImageProcessor ip, int mode)
          Finds edges using Sobel operator, Canny-Deriche Filter or Harris Corner Detector.
 ij.ImagePlus getImagePlus()
           
 ij.ImagePlus getImagePlus(int preProcessingStep)
          Returns the ImagePlus for the given PreprocessingStep.
 PreProcessingSettings getSettings()
           
 void initialize()
          initialize the preProcessingImage
 void initialize(java.net.URL url)
          initialize the preProcessingImage
 ij.process.ImageProcessor makeGreyScale(ij.process.ImageProcessor ip, int channel)
          Makes a grey scaled image of given channel or mean.
 void setSettings(PreProcessingSettings settings)
           
 void setWorkingPath(java.lang.String workingPath)
           
 void threshold(ij.process.ImageProcessor ip, int level)
          Makes threshold with a given level or makes autoThreshold.
 void updateToolkit()
          Updates ImageProcessors of all Preprocessing-Steps.
 void updateToolkit(int preProcessingStep)
          Updates ImageProcessor of the given Preprocessing-Step.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_IMAGE

public static final java.lang.String DEFAULT_IMAGE
See Also:
Constant Field Values
Constructor Detail

PreProcessingImageToolkit

public PreProcessingImageToolkit()
standard constructor


PreProcessingImageToolkit

public PreProcessingImageToolkit(java.net.URL url)
                          throws java.io.FileNotFoundException
standard constructor

Parameters:
url -
Throws:
java.io.FileNotFoundException
Method Detail

initialize

public void initialize(java.net.URL url)
                throws java.io.FileNotFoundException
initialize the preProcessingImage

Parameters:
url -
Throws:
java.io.FileNotFoundException

initialize

public void initialize()
initialize the preProcessingImage


makeGreyScale

public ij.process.ImageProcessor makeGreyScale(ij.process.ImageProcessor ip,
                                               int channel)
Makes a grey scaled image of given channel or mean.

Parameters:
channel - if GREYSCALEMODE_R, GREYSCALEMODE_G or GREYSCALEMODE_B then makes grey scaled of this channel.
if GREYSCALEMODE_MEAN then makes grey scaled with the mean of all channels.

edgeDetection

public ij.process.ImageProcessor edgeDetection(ij.process.ImageProcessor ip,
                                               int mode)
Finds edges using Sobel operator, Canny-Deriche Filter or Harris Corner Detector.

Parameters:
ip -
mode - : EDGEMODE_SOBELOPERATOR, EDGEMODE_CANNYDERICHEFILTER (with alpha=0.5 recommendation) or EDGEMODE_HARRISCORNERDETECTOR.
Returns:
ImageProcessor with detected edges.

threshold

public void threshold(ij.process.ImageProcessor ip,
                      int level)
Makes threshold with a given level or makes autoThreshold. If level in range of 0 - 255 then sets pixels less than or equal to level to 0 and all other pixels to 255. If level not in range of 0 - 255 then makes autoThreshold.

Parameters:
level - : if between 0 and 255 then makes threshold with this level,
otherwise makes autoThreshold.

getImagePlus

public ij.ImagePlus getImagePlus()
Returns:
last image of the imageList

getImagePlus

public ij.ImagePlus getImagePlus(int preProcessingStep)
Returns the ImagePlus for the given PreprocessingStep.

Parameters:
preProcessingStep -
Returns:
ImagePlus for the given PreprocessingStep

updateToolkit

public void updateToolkit()
Updates ImageProcessors of all Preprocessing-Steps.


updateToolkit

public void updateToolkit(int preProcessingStep)
Updates ImageProcessor of the given Preprocessing-Step.

Parameters:
preProcessingStep -

getSettings

public PreProcessingSettings getSettings()

setSettings

public void setSettings(PreProcessingSettings settings)

setWorkingPath

public void setWorkingPath(java.lang.String workingPath)