edu.stanford.rsl.konrad.filtering.redundancy
Class ParkerWeightingTool

java.lang.Object
  extended by edu.stanford.rsl.konrad.filtering.ImageFilteringTool
      extended by edu.stanford.rsl.konrad.filtering.IndividualImageFilteringTool
          extended by edu.stanford.rsl.konrad.filtering.redundancy.ParkerWeightingTool
All Implemented Interfaces:
Citeable, GUIConfigurable, SafeSerializable, NamedParallelizableRunnable, ParallelizableRunnable, java.io.Serializable, java.lang.Cloneable, java.lang.Runnable
Direct Known Subclasses:
NooWeightingTool, OSCARWeightingTool, SilverWeightingTool, SinogramWeightingTool, WesargWeightingTool

public class ParkerWeightingTool
extends IndividualImageFilteringTool

Implementation of Parker weights. Note that you may require a HorizontalFlippingTool applied before and after the weights depending on the rotation direction of the source detector pair.

Author:
Andreas Maier
See Also:
Serialized Form

Constructor Summary
ParkerWeightingTool()
           
 
Method Summary
 ij.process.ImageProcessor applyToolToProcessor(ij.process.ImageProcessor imageProcessor)
          Applies the tool to the given image processor.
 IndividualImageFilteringTool clone()
          All ImageFilteringTools need to be Cloneable in order to enable multiple processor usage.
 double[] computeParkerWeights1D(double beta)
          Returns the row weights for the given angle (in radians);
 double[] computeParkerWeights1D(int projNum)
          computes the set of Parker weights for the given projection
 void configure()
          Configures the object before execution
 java.lang.String getBibtexCitation()
          Returns the citation in bibTex format
 int getDetectorWidth()
           
 java.lang.String getMedlineCitation()
          Returns the citation in Medline format
 int getNumberOfProjections()
           
 double getPixelDimensionX()
           
 double[] getPrimaryAngles()
           
 double getSourceToDetectorDistance()
           
 java.lang.String getToolName()
          returns the name of the actual tool which was used.
 boolean isDeviceDependent()
          Is used to compensate ambiguities caused by double rays.
static double linearWeight(double alpha, double beta, double delta)
          Implements a linear weighting which complies with weight(alpha, beta) + weight (- alpha, beta - Math.PI + (2*alpha)) = 1 (Sum of the weight for opposing rays is 1).
 void setConfiguration(Configuration config)
           
 void setDetectorWidth(int detectorWidth)
           
 void setNumberOfProjections(int numberOfProjections)
           
 void setPixelDimensionX(double pixelDimensionX)
           
 void setPrimaryAngles(double[] primaryAngles)
           
 void setSourceToDetectorDistance(double sourceToDetectorDistance)
           
 
Methods inherited from class edu.stanford.rsl.konrad.filtering.IndividualImageFilteringTool
applyToolToProcessor, getFilteredImageProcessor, getImageIndex, getProcessName, prepareForSerialization, run, setImageIndex, setImageProcessor, setLatch
 
Methods inherited from class edu.stanford.rsl.konrad.filtering.ImageFilteringTool
getFilterTools, isConfigured, setConfigured, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ParkerWeightingTool

public ParkerWeightingTool()
Method Detail

getNumberOfProjections

public int getNumberOfProjections()

setNumberOfProjections

public void setNumberOfProjections(int numberOfProjections)

getDetectorWidth

public int getDetectorWidth()

setDetectorWidth

public void setDetectorWidth(int detectorWidth)

getPixelDimensionX

public double getPixelDimensionX()

setPixelDimensionX

public void setPixelDimensionX(double pixelDimensionX)

getSourceToDetectorDistance

public double getSourceToDetectorDistance()

setSourceToDetectorDistance

public void setSourceToDetectorDistance(double sourceToDetectorDistance)

getPrimaryAngles

public double[] getPrimaryAngles()

setPrimaryAngles

public void setPrimaryAngles(double[] primaryAngles)

setConfiguration

public void setConfiguration(Configuration config)

clone

public IndividualImageFilteringTool clone()
Description copied from class: IndividualImageFilteringTool
All ImageFilteringTools need to be Cloneable in order to enable multiple processor usage.

Specified by:
clone in class IndividualImageFilteringTool

getToolName

public java.lang.String getToolName()
Description copied from class: ImageFilteringTool
returns the name of the actual tool which was used.

Specified by:
getToolName in class ImageFilteringTool
Returns:
the name of the tool as string.

computeParkerWeights1D

public double[] computeParkerWeights1D(int projNum)
computes the set of Parker weights for the given projection

Parameters:
projNum - the projection number
Returns:
the weights

computeParkerWeights1D

public double[] computeParkerWeights1D(double beta)
Returns the row weights for the given angle (in radians);

Parameters:
beta - the angle
Returns:
the row weights

linearWeight

public static double linearWeight(double alpha,
                                  double beta,
                                  double delta)
Implements a linear weighting which complies with weight(alpha, beta) + weight (- alpha, beta - Math.PI + (2*alpha)) = 1 (Sum of the weight for opposing rays is 1).

Parameters:
alpha - the angle of the row element within the interval [-delta,delta]
beta - the current rotation angle of the source detector pair [0, Math.PI + 2delta]
delta - the half fan angle;
Returns:
the linear weight

applyToolToProcessor

public ij.process.ImageProcessor applyToolToProcessor(ij.process.ImageProcessor imageProcessor)
Applies the tool to the given image processor.

Specified by:
applyToolToProcessor in class IndividualImageFilteringTool
Parameters:
imageProcessor - the ImageProcessor
Returns:
the filtered instance of the ImageProcessor

configure

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

Throws:
java.lang.Exception - may happen

getBibtexCitation

public java.lang.String getBibtexCitation()
Description copied from interface: Citeable
Returns the citation in bibTex format

Returns:
citation as String

getMedlineCitation

public java.lang.String getMedlineCitation()
Description copied from interface: Citeable
Returns the citation in Medline format

Returns:
citation as String

isDeviceDependent

public boolean isDeviceDependent()
Is used to compensate ambiguities caused by double rays. Is not device dependent, but scan geometry dependent.

Specified by:
isDeviceDependent in class ImageFilteringTool
Returns:
true if the method is device dependent.