com.xinapse.multisliceimage.roi
Class ContourWorker

java.lang.Object
  extended by javax.swing.SwingWorker<java.lang.Void,java.lang.Integer>
      extended by com.xinapse.multisliceimage.roi.ContourWorker
All Implemented Interfaces:
java.lang.Runnable, java.util.concurrent.Future<java.lang.Void>, java.util.concurrent.RunnableFuture<java.lang.Void>

public class ContourWorker
extends javax.swing.SwingWorker<java.lang.Void,java.lang.Integer>

A SwingWorker for performing edge detection and contouring from a seed point.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Constructor Summary
ContourWorker(java.awt.geom.Point2D.Double seedPoint, boolean edgeDetection, boolean propagateBetweenSlices, java.lang.Object pixels, PixelDataType dataType, ComplexMode complexMode, int nCols, int nRows, int seedSlice, float pixelXSize, float pixelYSize, byte userColour, CanAddROIToFrame canAddROIToFrame, boolean preview)
          Instantiates a new ContourWorker that will perform contouring from the supplied seed pixel.
 
Method Summary
 void doCancel()
           
 java.lang.Void doInBackground()
          Runs this ContourWorker in the background.
 void done()
           
protected  void process(java.util.List<java.lang.Integer> dummy)
           
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, publish, removePropertyChangeListener, run, setProgress
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContourWorker

public ContourWorker(java.awt.geom.Point2D.Double seedPoint,
                     boolean edgeDetection,
                     boolean propagateBetweenSlices,
                     java.lang.Object pixels,
                     PixelDataType dataType,
                     ComplexMode complexMode,
                     int nCols,
                     int nRows,
                     int seedSlice,
                     float pixelXSize,
                     float pixelYSize,
                     byte userColour,
                     CanAddROIToFrame canAddROIToFrame,
                     boolean preview)
Instantiates a new ContourWorker that will perform contouring from the supplied seed pixel.

Parameters:
seedPoint - the coordinates of the pixel that will be used as the seed point.
edgeDetection - whether edge detection should be used to locate the edge of a feature before contouring around the edge. If false, then contouring performed directly from the seed point.
propagateBetweenSlices - whether contours should be propagated between slices.
pixels - the array of pixel values for the whole of the image.
dataType - the PixelDataType for the image pixels.
complexMode - the ComplexMode the contouring. For PixelDataType.COMPLEX images, the values contoured will depend on this setting.
nCols - the number of columns in the image.
nRows - the number of rows in the image.
pixelXSize - the width of an image pixel in mm.
pixelYSize - the height of an image pixel in mm.
userColour - the user-specified colour for the created ContourROIs.
canAddROIToFrame - resulting ROIs will be loaded to this CanAddROIToFrame by this ContourThread.
preview - true if the ROI(s) generated are to be previewed only, rather than added.
Method Detail

doInBackground

public java.lang.Void doInBackground()
Runs this ContourWorker in the background.

Specified by:
doInBackground in class javax.swing.SwingWorker<java.lang.Void,java.lang.Integer>

doCancel

public void doCancel()

process

protected void process(java.util.List<java.lang.Integer> dummy)
Overrides:
process in class javax.swing.SwingWorker<java.lang.Void,java.lang.Integer>

done

public void done()
Overrides:
done in class javax.swing.SwingWorker<java.lang.Void,java.lang.Integer>


Copyright 2006-2008 Xinapse Systems Limited. All Rights Reserved.