com.xinapse.multisliceimage.roi
Class MorphologicalOperationWorker

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

public class MorphologicalOperationWorker
extends javax.swing.SwingWorker<java.util.List<ROI>,java.lang.Integer>

This SwingWorker is used to perform morphological operations (dilation and erosion) on ROIs.


Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.SwingWorker
javax.swing.SwingWorker.StateValue
 
Constructor Summary
MorphologicalOperationWorker(CanAddROIToFrame f, java.util.List<ROI> rois, double radius)
          Creates a new MorphologicalOperationWorker to operate on a set of ROIs.
 
Method Summary
 java.util.List<ROI> doInBackground()
          Perform the morphological operation.
 void done()
           
protected  void process(java.util.List<java.lang.Integer> opsCompleted)
           
 
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

MorphologicalOperationWorker

public MorphologicalOperationWorker(CanAddROIToFrame f,
                                    java.util.List<ROI> rois,
                                    double radius)
Creates a new MorphologicalOperationWorker to operate on a set of ROIs.

Parameters:
f - the CanAddROIToFrame that will (if non-null) be updated when this MorphologicalOperationWorker has finished.
rois - the java.util.List of ROIs to be operated on.
radius - the distance by which the perimeter of the ROIs is dilated. A negative radius indicated that an erosion should be performed.
Method Detail

doInBackground

public java.util.List<ROI> doInBackground()
Perform the morphological operation.

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

done

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

process

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


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