edu.stanford.rsl.konrad.phantom.workers
Class SliceWorker

java.lang.Object
  extended by edu.stanford.rsl.konrad.phantom.workers.SliceWorker
All Implemented Interfaces:
Citeable, GUIConfigurable, NamedParallelizableRunnable, ParallelizableRunnable, java.lang.Cloneable, java.lang.Runnable
Direct Known Subclasses:
AnalyticPhantom3DVolumeRenderer, AnalyticPhantomProjectorWorker, BoxPhantom, DiracProjectionPhantom, PDS2Phantom, SheppLoganPhantomWorker, SurfaceBSplineVolumePhantom, VolumeOfInterestPhantom

public abstract class SliceWorker
extends java.lang.Object
implements NamedParallelizableRunnable, java.lang.Cloneable, GUIConfigurable, Citeable

Class to model an abstract slice worker.

Author:
akmaier

Constructor Summary
SliceWorker()
           
 
Method Summary
abstract  SliceWorker clone()
           
 void configure()
          Configures the object before execution
 void copyInternalElementsTo(SliceWorker other)
          Method to be called in the clones of Subclasses to copy the information of this class into the new clone.
static SliceWorker[] getAvailableSliceWorkers()
          Reports a list of all known subclasses of SliceWorker
static java.lang.String[] getAvailableWorkersAsString()
          Gives a list of the available Workers as String []
static SliceWorker getWorkerFromString(java.lang.String name)
          Method to select a worker given it's String representation
 boolean isConfigured()
          Is true if the object was successfully configured
 boolean isShowStatus()
           
 void run()
           
 void setImagePlus(ij.ImagePlus image)
          Sets the volume to work on.
 void setLatch(java.util.concurrent.CountDownLatch latch)
           
 void setShowStatus(boolean showStatus)
           
 void setSliceList(java.util.Iterator<java.lang.Integer> sliceList)
          Sets the sliceList which is being processed
 java.lang.String toString()
           
abstract  void workOnSlice(ij.process.ImageProcessor image, int sliceNumber)
          Method will voxelize the phantom into the current slice
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.rsl.konrad.parallel.NamedParallelizableRunnable
getProcessName
 
Methods inherited from interface edu.stanford.rsl.apps.gui.Citeable
getBibtexCitation, getMedlineCitation
 

Constructor Detail

SliceWorker

public SliceWorker()
Method Detail

setLatch

public void setLatch(java.util.concurrent.CountDownLatch latch)
Specified by:
setLatch in interface ParallelizableRunnable

run

public void run()
Specified by:
run in interface java.lang.Runnable

setImagePlus

public void setImagePlus(ij.ImagePlus image)
Sets the volume to work on.

Parameters:
image - the volume

setSliceList

public void setSliceList(java.util.Iterator<java.lang.Integer> sliceList)
Sets the sliceList which is being processed

Parameters:
sliceList - the list of slice as Iterator of slice numbers

workOnSlice

public abstract void workOnSlice(ij.process.ImageProcessor image,
                                 int sliceNumber)
Method will voxelize the phantom into the current slice

Parameters:
image - the volume slice
sliceNumber - the slice number

clone

public abstract SliceWorker clone()
Overrides:
clone in class java.lang.Object

copyInternalElementsTo

public void copyInternalElementsTo(SliceWorker other)
Method to be called in the clones of Subclasses to copy the information of this class into the new clone.

Parameters:
other - the clone of the subclass.

getAvailableSliceWorkers

public static SliceWorker[] getAvailableSliceWorkers()
Reports a list of all known subclasses of SliceWorker

Returns:
the worker list.

getAvailableWorkersAsString

public static java.lang.String[] getAvailableWorkersAsString()
Gives a list of the available Workers as String []

Returns:
the worker names;

getWorkerFromString

public static SliceWorker getWorkerFromString(java.lang.String name)
Method to select a worker given it's String representation

Parameters:
name - the String
Returns:
the Worker

configure

public void configure()
               throws java.lang.Exception
Description copied from interface: GUIConfigurable
Configures the object before execution

Specified by:
configure in interface GUIConfigurable
Throws:
java.lang.Exception - may happen

isConfigured

public boolean isConfigured()
Description copied from interface: GUIConfigurable
Is true if the object was successfully configured

Specified by:
isConfigured in interface GUIConfigurable
Returns:
configured?

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

isShowStatus

public boolean isShowStatus()
Returns:
the showStatus

setShowStatus

public void setShowStatus(boolean showStatus)
Parameters:
showStatus - the showStatus to set