edu.stanford.rsl.konrad.filtering.rampfilters
Class RampFilter

java.lang.Object
  extended by edu.stanford.rsl.konrad.filtering.rampfilters.RampFilter
All Implemented Interfaces:
GUIConfigurable, SafeSerializable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ArbitraryRampFilter, CosineRampFilter, HammingRampFilter, HanningRampFilter, RamLakRampFilter, SheppLoganRampFilter

public abstract class RampFilter
extends java.lang.Object
implements java.lang.Cloneable, SafeSerializable, GUIConfigurable

Class to create Ramp Filters as described in Kak and Slaney 1988 (pp. 72) This class is the blue print for an arbitrary Ram Lak Filter. Subclasses implement different filterings.

Author:
Andreas Maier
See Also:
"RamLakRampFilter for an implementation without filtering", "SheppLoganRampFilter, CosineRampFilter, HanningRampFilter, HammingRampFilter for different implementations of filters", Serialized Form

Constructor Summary
RampFilter()
           
 
Method Summary
abstract  RampFilter clone()
           
 void configure()
          Configures the object before execution
static RampFilter[] getAvailableRamps()
           
 double getCutOffFrequency()
           
abstract  double getFilterWeight(double ku)
           
 ij.ImagePlus getImagePlusFromRampFilter(int width)
          Creates an ImagePlus to display the filter
 double getPhysicalPixelWidthInMilimeters()
           
 ij.process.FloatProcessor getRampFilter(int width)
          Method to generate a filter for in Fourier space given the width of the image to filter
 double[] getRampFilter1D(int width)
          Returns the filter for one detector row as complex double array (JTransforms format)
abstract  java.lang.String getRampName()
           
 double getSourceToCenterOfRotationDistance()
           
 double getSourceToDetectorDistance()
           
 boolean isConfigured()
          Is true if the object was successfully configured
 void prepareForSerialization()
          Sets all data objects in the serialized object to null which do not implement the Serializable interface.
 void setConfiguration(Configuration config)
           
 void setCutOffFrequency(double cutOffFrequency)
           
 void setPhysicalPixelWidthInMilimeters(double detectorWidth)
           
 void setSourceToCenterOfRotationDistance(double sourceToCenterOfRotationDistance)
           
 void setSourceToDetectorDistance(double sourceToDetectorDistance)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RampFilter

public RampFilter()
Method Detail

setConfiguration

public void setConfiguration(Configuration config)

getSourceToDetectorDistance

public double getSourceToDetectorDistance()

setSourceToDetectorDistance

public void setSourceToDetectorDistance(double sourceToDetectorDistance)

getSourceToCenterOfRotationDistance

public double getSourceToCenterOfRotationDistance()

setSourceToCenterOfRotationDistance

public void setSourceToCenterOfRotationDistance(double sourceToCenterOfRotationDistance)

getCutOffFrequency

public double getCutOffFrequency()

setCutOffFrequency

public void setCutOffFrequency(double cutOffFrequency)

getPhysicalPixelWidthInMilimeters

public double getPhysicalPixelWidthInMilimeters()

setPhysicalPixelWidthInMilimeters

public void setPhysicalPixelWidthInMilimeters(double detectorWidth)

getRampName

public abstract java.lang.String getRampName()

getRampFilter1D

public double[] getRampFilter1D(int width)
Returns the filter for one detector row as complex double array (JTransforms format)

Parameters:
width - the width of the detector row
Returns:
the filter in Fourier domain

getImagePlusFromRampFilter

public ij.ImagePlus getImagePlusFromRampFilter(int width)
Creates an ImagePlus to display the filter

Parameters:
width - width of the image
Returns:
the ImagePlus

getRampFilter

public ij.process.FloatProcessor getRampFilter(int width)
Method to generate a filter for in Fourier space given the width of the image to filter

Parameters:
width - the width of the input image
Returns:
the filter as ImageProcessor

getFilterWeight

public abstract double getFilterWeight(double ku)

clone

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

toString

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

getAvailableRamps

public static RampFilter[] getAvailableRamps()

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?

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

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