com.xinapse.multisliceimage.roi
Class ContourWorker

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

public class ContourWorker
extends MonitorWorker

A MonitorWorker 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
 
Field Summary
 
Fields inherited from class com.xinapse.util.MonitorWorker
errorMessage, indeterminateMonitor, monitor
 
Constructor Summary
ContourWorker(javax.vecmath.Point3i seedPoint, LoadableImage image, ComplexMode complexMode, ContourMode contourMode, double level, IntensityRelation intensityRelation, boolean threeD, int plusMinusSlices, byte userColour, boolean pixelSnap, boolean snapCentre, CanAddROIToFrame canAddROIToFrame, boolean preview)
          Instantiates a new ContourWorker that will perform contouring from the supplied seed pixel.
 
Method Summary
 ExitStatus doInBackground()
          Runs this ContourWorker in the background.
 void done()
          Overrides the done() method.
 javax.vecmath.Point3i getSeedPoint()
          Returns the seed point from which contouring was initiated.
 
Methods inherited from class com.xinapse.util.MonitorWorker
checkCancelled, checkCancelled, checkCancelled, checkCancelled, getComponent, getProgName, setAction, setAction
 
Methods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, 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(javax.vecmath.Point3i seedPoint,
                     LoadableImage image,
                     ComplexMode complexMode,
                     ContourMode contourMode,
                     double level,
                     IntensityRelation intensityRelation,
                     boolean threeD,
                     int plusMinusSlices,
                     byte userColour,
                     boolean pixelSnap,
                     boolean snapCentre,
                     CanAddROIToFrame canAddROIToFrame,
                     boolean preview)
              throws InvalidImageException
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.
image - the image on which contouring will be performed.
complexMode - the ComplexMode the contouring. For PixelDataType.COMPLEX images, the values contoured will depend on this setting.
contourMode - the mode by which the edge is located. before contouring around the edge. If false, then contouring performed directly from the seed point.
threeD - whether to create contours in 3-D.
plusMinusSlices - the maximum number of slices either side of the seed slice when propagating in 3-D.
userColour - the user-specified colour for the created ContourROIs.
pixelSnap - whether to snap the contour to the nearest pixel corners/centres.
snapCentre - if true, snap to the centre of pixels; if false snap to the corners.
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.
Throws:
InvalidImageException
Method Detail

getSeedPoint

public javax.vecmath.Point3i getSeedPoint()
Returns the seed point from which contouring was initiated.

Returns:
the seed point from which contouring was initiated.

doInBackground

public ExitStatus doInBackground()
Runs this ContourWorker in the background.

Specified by:
doInBackground in class MonitorWorker
Returns:
the ExitStatus indicating whether the processing was successful, and if not why not.

done

public void done()
Description copied from class: MonitorWorker
Overrides the done() method. Closes the ProgressMonitor or IndeterminateProgressMonitor.

Overrides:
done in class MonitorWorker


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