java.lang.Objectholoj.HoloJProcessor
Class HoloJProcessor contains data and methods to provide high level access and manipulation to complex valued pixel data.
Constructor Summary | |
HoloJProcessor(double[] realPixels,
double[] complexPixels,
int width,
int height)
Creates a new object of the HoloJProcessor class. |
|
HoloJProcessor(double[] realPixels,
int width,
int height)
Creates a new object of the HoloJProcessor class. |
|
HoloJProcessor(ij.process.ImageProcessor ip)
Creates a new object of the class HoloJProcessor. |
|
HoloJProcessor(ij.process.ImageProcessor realIp,
ij.process.ImageProcessor complexIp)
Creates a new object of the class HoloJProcessor, starting from data contained in the two ImageProcessors provided. |
|
HoloJProcessor(int width,
int height)
Creates a new object of the class HoloJProcessor. |
Method Summary | |
void |
add(double[] operandArray)
Add to complex pixels the scalar data in operand array. |
void |
add(HoloJProcessor operand)
Adds the complex pixels of operand HoloJProcessor to real and complex pixels. |
void |
add(ij.process.ImageProcessor operand)
Add to real pixels the real pixels of operand ImageProcessor. |
void |
addPhase(double angle)
Add to complex pixels phase the specified radians. |
void |
addPhasePlate(double[] plateArray)
Add to complex pixels the phase plate specified by the double array. |
ij.process.FloatProcessor |
createAmplitudeProcessor()
Creates a amplitude ImageProcessor from realPixels and complexPixels. |
ij.process.FloatProcessor |
createPhaseProcessor()
Creates a phase ImageProcessor from realPixels and complexPixels. |
ij.process.FloatProcessor |
createPowerSpectrumProcessor()
Creates a power spectrum ImageProcessor from realPixels and complexPixels. |
ij.process.FloatProcessor |
createSpectrumProcessor()
Creates a spectrum ImageProcessor from realPixels and complexPixels. |
void |
divide(double[] operandArray)
Divide complex pixels by scalar data in operand array. |
void |
divide(HoloJProcessor operand)
Divides real and complex pixels by the complex pixels of operand HoloJProcessor. |
void |
divide(ij.process.ImageProcessor operand)
Divide the real and complex pixels by the real pixels of operand ImageProcessor. |
void |
doFFT()
Perform Fast Fourier Transform, in the forward direction of data stored in real and complex pixels. |
void |
doInverseFFT()
Perform Fast Fourier Transform, in the backward direction of data stored in real and complex pixels. |
ij.measure.Calibration |
getCalibration()
Return the calibration of this HoloJPpocessor. |
double[] |
getComplexPixelsArray()
Returns a double array containing the complex pixels in row major mode. |
int |
getHeight()
Returns the height of the image. |
java.awt.Point |
getMaximumPosition()
Finds the maximum of the modulus of realPixels and complexPixels. |
java.awt.Point |
getMaximumPosition(ij.gui.Roi selection)
Finds the maximum of the modulus of realPixels and complexPixels in the region specified by the selection. |
double[] |
getRealPixelsArray()
Returns a double array containing the real pixels in row major mode. |
HoloJProcessor |
getSideband(java.awt.Point sideCenter,
int radius,
int scaleFactor,
boolean useButterworth)
Returns an HoloJProcessor containing the selected sideband data. |
java.awt.Point |
getSidebandCenter(int side)
Finds the position of the maximum lateral peak of the spectrum. |
int |
getSize()
Returns the size of the image. |
java.lang.String |
getTitle()
Return the title of this HoloJProcessor. |
int |
getWidth()
Returns the width of the image. |
boolean |
isSpectrumDomain()
Returns true if the image has being Fourier transformed. |
ij.ImagePlus |
makeAmplitudeImage(java.lang.String title)
Creates an ImagePlus with the amplitude of data. |
ij.ImagePlus |
makePhaseImage(java.lang.String title)
Creates an ImagePlus with the phase of data. |
ij.ImagePlus |
makePowerSpectrumImage(java.lang.String title)
Creates an ImagePlus with the power spectrum of data. |
ij.ImagePlus |
makeSpectrumImage(java.lang.String title)
Creates an ImagePlus with the spectrum of data. |
void |
multiply(double[] operandArray)
Multiply complex pixels by scalar data in operand array. |
void |
multiply(HoloJProcessor operand)
Multiplies real and complex pixels by the complex pixels of operand HoloJProcessor. |
void |
multiply(ij.process.ImageProcessor operand)
Multiplies real and complex pixels by the scalar pixels of operand ImageProcessor. |
void |
setCalibration(ij.measure.Calibration newCal)
Set the calibration of this HoloJProcessor to new calibration. |
void |
setComplexOrigin()
Set origin of this HoloJProcessor to Complex. |
void |
setComplexPixelsArray(double[] pixels)
Sets complex pixels from a double array of data in row major mode. |
void |
setRealOrigin()
Set origin of this HoloJProcessor to Real. |
void |
setRealPixelsArray(double[] pixels)
Sets real pixels from a double array of data in row major mode. |
void |
setTitle(java.lang.String newTitle)
Set the title of this HoloJProcesor to new title. |
void |
show(java.lang.String title)
Creates and shows an ImagePlus containing the power spectrum. |
void |
showAmplitude(java.lang.String title)
Creates and show an ImagePlus displaying the amplitude of data. |
void |
showPhase(java.lang.String title)
Creates and show an ImagePlus displaying the phase of data. |
void |
showPowerSpectrum(java.lang.String title)
Creates and show an ImagePlus displaying the power spectrum of data. |
void |
showSpectrum(java.lang.String title)
Creates and show an ImagePlus displaying the spectrum of data. |
void |
subtract(double[] operandArray)
Subtract to complex pixels the scalar data in operand array. |
void |
subtract(HoloJProcessor operand)
Subtracts the complex pixels of operand HoloJProcessor to real and complex pixels. |
void |
subtract(ij.process.ImageProcessor operand)
Subtract to real pixels, the real pixels of operand ImageProcessor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public HoloJProcessor(int width, int height)
width
- the size of the image along the X-axisheight
- the size of the image along the Y-axispublic HoloJProcessor(ij.process.ImageProcessor ip)
ip
- ImageProcessor providing real data value.public HoloJProcessor(ij.process.ImageProcessor realIp, ij.process.ImageProcessor complexIp)
realIp
- ImageProcessor providing real data value.complexIp
- ImageProcessor providing complex data value.public HoloJProcessor(double[] realPixels, double[] complexPixels, int width, int height)
realPixels
- real pixels array.complexPixels
- complex pixels array.width
- image width.height
- image height.public HoloJProcessor(double[] realPixels, int width, int height)
realPixels
- real pixels array.width
- image width.height
- image height.Method Detail |
public double[] getRealPixelsArray()
public double[] getComplexPixelsArray()
public void setRealPixelsArray(double[] pixels)
pixels
- the pixels array.public void setComplexPixelsArray(double[] pixels)
pixels
- the pixels array.public int getSize()
public int getWidth()
public int getHeight()
public boolean isSpectrumDomain()
public void add(HoloJProcessor operand)
operand
- theHoloJProcessorr operand.public void subtract(HoloJProcessor operand)
operand
- theHoloJProcessorr operand.public void multiply(HoloJProcessor operand)
operand
- theHoloJProcessorr operand.public void multiply(ij.process.ImageProcessor operand)
operand
- the ImageProcessor operand.public void add(ij.process.ImageProcessor operand)
operand
- the ImageProcessor operand.public void subtract(ij.process.ImageProcessor operand)
operand
- the ImageProcessor operand.public void divide(ij.process.ImageProcessor operand)
operand
- the ImageProcessor operand.public void multiply(double[] operandArray)
operandArray
- the array operand.public void divide(double[] operandArray)
operandArray
- the array operand.public void add(double[] operandArray)
operandArray
- the array operand.public void subtract(double[] operandArray)
operandArray
- the array operand.public void divide(HoloJProcessor operand)
operand
- the HoloJProcessor operand.public void addPhase(double angle)
angle
- radians to add.public void addPhasePlate(double[] plateArray)
plateArray
- the array of radians to add.public void setRealOrigin()
public void setComplexOrigin()
public void setCalibration(ij.measure.Calibration newCal)
newCal
- new calibration to apply.public ij.measure.Calibration getCalibration()
public void setTitle(java.lang.String newTitle)
newTitle
- the new title to use.public java.lang.String getTitle()
public void doFFT()
public void doInverseFFT()
public void show(java.lang.String title)
title
- title for the image displayied.public void showPowerSpectrum(java.lang.String title)
title
- the title of the displayied image.public void showSpectrum(java.lang.String title)
title
- the title of the displayied image.public void showAmplitude(java.lang.String title)
title
- the title of the displayied image.public void showPhase(java.lang.String title)
title
- the title of the displayied image.public ij.ImagePlus makePowerSpectrumImage(java.lang.String title)
title
- the title of the image.public ij.ImagePlus makeSpectrumImage(java.lang.String title)
title
- the title of the image.public ij.ImagePlus makeAmplitudeImage(java.lang.String title)
title
- the title of the image.public ij.ImagePlus makePhaseImage(java.lang.String title)
title
- the title of the image.public ij.process.FloatProcessor createPowerSpectrumProcessor()
public ij.process.FloatProcessor createSpectrumProcessor()
public ij.process.FloatProcessor createAmplitudeProcessor()
public ij.process.FloatProcessor createPhaseProcessor()
public java.awt.Point getMaximumPosition()
public java.awt.Point getMaximumPosition(ij.gui.Roi selection)
selection
- selected area of the pixels.
public java.awt.Point getSidebandCenter(int side)
side
- side of the spectrum where to look for the maximum.
public HoloJProcessor getSideband(java.awt.Point sideCenter, int radius, int scaleFactor, boolean useButterworth)
sideCenter
- Point of sideband center.radius
- radius of the selected region.scaleFactor
- scale factor of final reconstructed image.useButterworth
- flag for using soft aperture.
Copyright 2007 © Luca Ortolani and Pier Francesco Fazzini
Permission to use the software and accompanying documentation provided on these pages for educational, research, and not-for-profit purposes, without fee and without a signed licensing agreement, is hereby granted, provided that the above copyright notice, this paragraph and the following two paragraphs appear in all copies. The copyright holder is free to make upgraded or improved versions of the software available for a fee or commercially only. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, OF ANY KIND WHATSOEVER, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF HE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THE COPYRIGHT HOLDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND ACCOMPANYING DOCUMENTATION IS PROVIDED "AS IS". THE COPYRIGHT HOLDER HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.