Package com.xinapse.multisliceimage.roi
Class ContourWorker
java.lang.Object
javax.swing.SwingWorker<ExitStatus,Integer>
com.xinapse.util.MonitorWorker
com.xinapse.multisliceimage.roi.ContourWorker
- All Implemented Interfaces:
Runnable,Future<ExitStatus>,RunnableFuture<ExitStatus>
A MonitorWorker for performing edge detection and contouring from a seed point.
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.SwingWorker
SwingWorker.StateValue -
Field Summary
Fields inherited from class com.xinapse.util.MonitorWorker
errorMessage, indeterminateMonitor, monitor -
Constructor Summary
ConstructorsConstructorDescriptionContourWorker(org.jogamp.vecmath.Point3i seedPoint, ReadableImage image, ComplexMode complexMode, ContourMode contourMode, double level, IntensityRelation intensityRelation, boolean threeD, short 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
Modifier and TypeMethodDescriptionRuns thisContourWorkerin the background.voiddone()Overrides thedone()method.org.jogamp.vecmath.Point3iReturns the seed point from which contouring was initiated.Methods inherited from class com.xinapse.util.MonitorWorker
checkCancelled, checkCancelled, checkCancelled, checkCancelled, getComponent, getProgName, setAction, setActionMethods inherited from class javax.swing.SwingWorker
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgress
-
Constructor Details
-
ContourWorker
public ContourWorker(org.jogamp.vecmath.Point3i seedPoint, ReadableImage image, ComplexMode complexMode, ContourMode contourMode, double level, IntensityRelation intensityRelation, boolean threeD, short 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- theComplexModethe 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.level- the intensity level if contouring at a fixed level.intensityRelation- the IntensityRelation of the feature to be contoured relative to the background.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 thisCanAddROIToFrameby thisContourWorker.preview-trueif the ROI(s) generated are to be previewed only, rather than added.- Throws:
InvalidImageException- if the pixel intensity values cannot be gotten from the image.
-
-
Method Details
-
getSeedPoint
public org.jogamp.vecmath.Point3i getSeedPoint()Returns the seed point from which contouring was initiated.- Returns:
- the seed point from which contouring was initiated.
-
doInBackground
Runs thisContourWorkerin the background.- Specified by:
doInBackgroundin classMonitorWorker- Returns:
- the
ExitStatusindicating whether the processing was successful, and if not why not.
-
done
public void done()Description copied from class:MonitorWorker- Overrides:
donein classMonitorWorker
-