edu.stanford.rsl.konrad.filtering
Class IndividualImageFilteringTool

java.lang.Object
  extended by edu.stanford.rsl.konrad.filtering.ImageFilteringTool
      extended by edu.stanford.rsl.konrad.filtering.IndividualImageFilteringTool
All Implemented Interfaces:
Citeable, GUIConfigurable, SafeSerializable, NamedParallelizableRunnable, ParallelizableRunnable, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
Direct Known Subclasses:
AbsoluteValueTool, ApplyLambdaWeightingTool, AutomaticExposureControlCompensationTool, BilateralFilteringTool, CosineWeightingTool, DynamicDensityOptimizationScatterCorrectionTool, Filtering2DTool, HilbertFilteringTool, HorizontalFlippingTool, HoughFilteringTool, ImageConstantMathFilter, ImageMathFilter, IndividualImagePipelineFilteringTool, LowContrastScatterCorrectionTool, LowContrastWaterCorrectionTool, MeanFilteringTool, NumericalDerivativeComputationTool, ParkerWeightingTool, PDS2GeometryCalibrationTool, PoissonNoiseFilteringTool, RampFilteringTool, Rotate90DegreeLeftTool, RowWeightingTool, TruncationCorrectionTool, VolumeAttenuationFactorCorrectionTool

public abstract class IndividualImageFilteringTool
extends ImageFilteringTool
implements NamedParallelizableRunnable

See Also:
Serialized Form

Constructor Summary
IndividualImageFilteringTool()
           
 
Method Summary
abstract  ij.process.ImageProcessor applyToolToProcessor(ij.process.ImageProcessor imageProcessor)
          Is called in every thread to apply the tool to an individual ImageProcessor
 SerializableFloatProcessor applyToolToProcessor(SerializableFloatProcessor imageProcessor)
           
abstract  IndividualImageFilteringTool clone()
          All ImageFilteringTools need to be Cloneable in order to enable multiple processor usage.
 ij.process.ImageProcessor getFilteredImageProcessor()
          returns the filtered ImageProcessor if the filtering was successful.
 int getImageIndex()
          Returns the index of the current image in the ImageStack.
 java.lang.String getProcessName()
           
 void prepareForSerialization()
          Sets all data objects in the serialized object to null which do not implement the Serializable interface.
 void run()
          This method performs the correction on one frame, i.e., one projection image.
 void setImageIndex(int imageIndex)
          Sets the number of the current image in the stack.
 void setImageProcessor(SerializableFloatProcessor imageProcessor)
          Sets the actual ImageProcessor to be filtered.
 void setLatch(java.util.concurrent.CountDownLatch latch)
           
 
Methods inherited from class edu.stanford.rsl.konrad.filtering.ImageFilteringTool
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

IndividualImageFilteringTool

public IndividualImageFilteringTool()
Method Detail

clone

public abstract IndividualImageFilteringTool clone()
All ImageFilteringTools need to be Cloneable in order to enable multiple processor usage.

Specified by:
clone in class ImageFilteringTool

getImageIndex

public int getImageIndex()
Returns the index of the current image in the ImageStack.

Returns:
the current image index
See Also:
setImageIndex(int)

applyToolToProcessor

public abstract ij.process.ImageProcessor applyToolToProcessor(ij.process.ImageProcessor imageProcessor)
                                                        throws java.lang.Exception
Is called in every thread to apply the tool to an individual ImageProcessor

Parameters:
imageProcessor - the ImageProcessor
Returns:
the filtered instance of the ImageProcessor
Throws:
java.lang.Exception

setImageIndex

public void setImageIndex(int imageIndex)
Sets the number of the current image in the stack. This information my be required for some filters which apply a slightly different filter to each image. This depends on the actual implementation of the filter. The AECFilter for example requires this information.

Parameters:
imageIndex - the index of the current image.

setImageProcessor

public void setImageProcessor(SerializableFloatProcessor imageProcessor)
Sets the actual ImageProcessor to be filtered. A duplicate will be created for each thread.

Parameters:
imageProcessor - the processor to be filtered.

setLatch

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

run

public void run()
This method performs the correction on one frame, i.e., one projection image.

Specified by:
run in interface java.lang.Runnable

getFilteredImageProcessor

public ij.process.ImageProcessor getFilteredImageProcessor()
returns the filtered ImageProcessor if the filtering was successful.

Returns:
the filtered ImageProcessor

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

applyToolToProcessor

public SerializableFloatProcessor applyToolToProcessor(SerializableFloatProcessor imageProcessor)
                                                throws java.lang.Exception
Throws:
java.lang.Exception

getProcessName

public java.lang.String getProcessName()
Specified by:
getProcessName in interface NamedParallelizableRunnable