edu.stanford.rsl.konrad.filtering.multiprojection
Class MultiProjectionFilter

java.lang.Object
  extended by edu.stanford.rsl.konrad.filtering.ImageFilteringTool
      extended by edu.stanford.rsl.konrad.filtering.multiprojection.MultiProjectionFilter
All Implemented Interfaces:
Citeable, GUIConfigurable, SafeSerializable, ProjectionSink, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
Direct Known Subclasses:
AnisotropicStructureTensorNoiseFilter, BlockWiseMultiProjectionFilter, Lambda3DDerivativeFilter, PrimaryModulationScatterCorrectionTool, ProjectionSortingFilter, ReconstructionFilter

public abstract class MultiProjectionFilter
extends ImageFilteringTool
implements ProjectionSink, java.lang.Runnable

Abstract class to handle multi projection filter. The complete projection stack must be streamed into this filter using it as a ProjectionSink. All projections are buffered internally. As soon as the context constraint gets valid the filter is available as a ProjectionSource. The garbage collector is invoked after the processing of the data is finished. If memory limitations are a problem the garbage collector may also be invoked after collecting some data from the ProjectionSource as the references are set to null internally during this process.

Author:
Andreas Maier
See Also:
Serialized Form

Constructor Summary
MultiProjectionFilter()
           
 
Method Summary
 void close()
           
 void feedFilter(ProjectionSource source, boolean showStatus)
          feeds the filter from a projection Source.
 int getContext()
           
 java.lang.String getName()
           
 void prepareForSerialization()
          Sets all data objects in the serialized object to null which do not implement the Serializable interface.
 void process(ij.process.ImageProcessor projection, int projectionNumber)
           
 void run()
           
 void setContext(int context)
           
 void setShowStatus(boolean showStatus)
           
 void setSink(ProjectionSink sink)
          Used to connect the filter with the rest of the pipeline.
 void start()
          Packs the filter into a Thread and starts it.
 
Methods inherited from class edu.stanford.rsl.konrad.filtering.ImageFilteringTool
clone, getFilterTools, getToolName, isConfigured, isDeviceDependent, setConfigured, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.rsl.apps.gui.GUIConfigurable
configure
 
Methods inherited from interface edu.stanford.rsl.apps.gui.Citeable
getBibtexCitation, getMedlineCitation
 

Constructor Detail

MultiProjectionFilter

public MultiProjectionFilter()
Method Detail

setContext

public void setContext(int context)

getContext

public int getContext()

setShowStatus

public void setShowStatus(boolean showStatus)
Specified by:
setShowStatus in interface ProjectionSink

setSink

public void setSink(ProjectionSink sink)
Used to connect the filter with the rest of the pipeline.

Parameters:
sink -

start

public void start()
Packs the filter into a Thread and starts it.


prepareForSerialization

public void prepareForSerialization()
Description copied from interface: SafeSerializable
Sets all data objects in the serialized object to null which do not implement the Serializable interface. It can also be used to save space in the serialized form. Configuration parameters are preserved. Processing data is discarded.

Specified by:
prepareForSerialization in interface SafeSerializable
Specified by:
prepareForSerialization in class ImageFilteringTool

process

public void process(ij.process.ImageProcessor projection,
                    int projectionNumber)
             throws java.lang.Exception
Specified by:
process in interface ProjectionSink
Throws:
java.lang.Exception

run

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

close

public void close()
Specified by:
close in interface ProjectionSink

getName

public java.lang.String getName()
Specified by:
getName in interface ProjectionSink

feedFilter

public void feedFilter(ProjectionSource source,
                       boolean showStatus)
                throws java.lang.Exception
feeds the filter from a projection Source.

Parameters:
source - the source
showStatus - displays whether the status should be displayed using ImageJ
Throws:
java.lang.Exception - may happen.