jpiv2
Class Settings

java.lang.Object
  extended by jpiv2.Settings
All Implemented Interfaces:
java.io.Serializable

public class Settings
extends java.lang.Object
implements java.io.Serializable

Serializable object encapsulating all program settings.

See Also:
Serialized Form

Field Summary
 boolean cmdLineWrap
          Set true to wrap lines.
 int cmdNumOfLines
          Maximum number of lines in history.
 boolean exportCorrFunction
          If true, a sample ensemble correlation functions is exported every loop.
 int exportCorrFunctionNum
          Number of the correlation function to export (starting from upper left corner).
 int exportCorrFunctionPass
          Specify pass when to export the correlation function.
 boolean imgTwoFrames
          Treat imges as double frame imgages if true.
 float imgZoom
          Zoom factor for image display.
 int invalidateIsolatedVectorsNumOfNeighbours
          Invalidate a vector if it has less direct valid neighbours than specified.
 java.lang.String jpivLibPath
          Location of additional files, like native libraries, documentation, scripts.
 boolean labelInvalidVectors
          Set true to plot invalid vectors in the specified color.
 boolean loadSaveTecplotHeader
          Set true to save vector files with a Tecplot header.
 double normMedianTestNoiseLevel
          Noise Level of the normalized median test (0.1 is a good starting point).
 double normMedianTestThreshold
          Threshold of the normalized median test (2 is a good starting point).
static int PIV_CASCADE
          Constant.
static int PIV_CONSECUTIVE
          Constant.
static int PIV_SKIP
          Constant.
static int PIV_TWO_IMG
          Constant.
 java.lang.String pivDefaultDestFileName
           
 int pivHorPreShift
          Horizontal pre-shift of the interrogation window during the first pass.
 boolean pivMedian
          Apply a median filter between the passes.
 int pivMultiPass
          Number of passes.
 boolean pivNormMedianTest
          Perform a normalized median test between the passes.
 boolean pivReplace
          Replace invaldid vectors by the median between the passes.
 boolean pivROI
          Constricts the PIV evaluation on a region of interest if true.
 int pivROIP1x
          Upper, left boundary of region of interest.
 int pivROIP1y
          Upper, top boundary of region of interest.
 int pivROIP2x
          Lower, right boundary of region of interest.
 int pivROIP2y
          Lower, bottom boundary of region of interes.
 int pivSequence
          One of the constants PIV_TOW_IMG, PIV_CONSECUTIVE, PIV_SKIP, PIV_CASCADE to define which images to correlate with each other.
 boolean pivShearIntWindows
          Use window deformation to enhance accuracy.
 int pivSkip
          The number of images to skip if pivSequence==PIV_SKIP.
 boolean pivSmoothing
          Use 3x3 smoothing (average) between the passes.
 boolean pivSumOfCorr
          Sum up all correlation functions of an ensemble before searching the correlation peak position.
 boolean pivUseDefaultDestFileName
          Set true to use a default or software set destination file name.
 boolean pivUseImageBaseName
          Set true to use the image base name as the default output filename.
 int pivVerPreShift
          Vertical pre-shift of the interrogation window during the first pass.
 int[][] pivWindow
          Definition of the interrogation window size, search domain size and vector spacing.
 boolean profileAverage
          Calculate the average of a number of parallel profiles.
 int profileDistance
          Distance between profiles.
 boolean profileFixDataPoints
          Create a fixed number of data points, independent on the length of the profile.
 int profileNumberOf
          Number of profiles to average.
 int profileNumOfFixDataPoints
          Specify the number of data points along the profile.
 boolean profilePrintData
          Prints the data of the interpolated profile to standard output, if true.
 boolean profilePrintStat
          If true, print some statistics to standard output, when a profile is drawn into a vector plot.
 boolean profileQuadInterp
          Use a quadratic interpolation between the points of a profile.
 java.awt.Color shapeColor
          Color of shapes (e.g. profiles).
 boolean singlePixel3by3
          Use 3x3 pixel direct correlation, instead of single pixel correlation.
 boolean singlePixelCreatePreShiftVectorField
          First do a standard-PIV evaluation to create a pre-shift vector field, if true.
 int singlePixelDomainHeight
          Search domain hight for single pixel correlation.
 int singlePixelDomainWidth
          Search domain widht for single pixel correlation.
 int singlePixelHorPreShift
          Horizontal pre-shift for single pixel correlation.
 boolean singlePixelROI
          Constrict the single pixel ensemble evaluation to a region of interest.
 int singlePixelROIP1x
          Upper, left border of region of interst.
 int singlePixelROIP1y
          Upper, top border of region of interst.
 int singlePixelROIP2x
          Lower, right border of region of interst.
 int singlePixelROIP2y
          Lower, bottom border of region of interest.
 boolean singlePixelSignalOnly
          Considers only pixel whose value is above the average value.
 boolean singlePixelTwoImg
          During single pixel ensemble evaluation, treat images as double frame images.
 int singlePixelVerPreShift
          Vertical pre-shift for single pixel correlation.
 double subsRefDispDx
          Substract a reference displacement, horizontal component.
 double subsRefDispDy
          Substract a reference displacement, vertical component.
 double thirdCompReconDz
          Distance between measurement planes (for third component reconstruction based on mass conservation).
 boolean thirdCompReconLinReg
          The first step of the third component reconstruction is the calculation of the first derivative of the velocity field.
 int thirdCompReconSkip
          Skip measurement planes (for third component reconstruction based on mass conservation).
 int vectorAngle
          Opening angle of the arrow head.
 java.awt.Color vectorAxes
          The color of the plot axes.
 java.lang.String vectorAxisLabel
          The label of the axes (e.g. the unit).
 float vectorAxisScaling
          The scaling of the axis labels (e.g. for unit conversion).
 java.awt.Color vectorBackground
          Color of the vector plot background.
 boolean vectorBackgroundColorCoding
          Set true to create a color coded background, based on the values in the specified data column (e.g. vorticity).
 int vectorBackgroundColorCodingColumn
          Specifys the column number used for the color coded background, zero for the first column.
 float vectorBackgroundColorCodingMax
          Value used for the highest color (red).
 float vectorBackgroundColorCodingMin
          Value used for the lowest color (blue).
 boolean vectorBackgroundImage
          Set true to use a pixel image as background.
 java.lang.String vectorBackgroundImagePath
          Location of the background image.
 java.awt.Color vectorBorder
          The background color outside the vector field.
 java.awt.Color vectorColor
          Color of the vectors.
 java.lang.String vectorColorBarFormatString
          Define a decimal format for the color bar.
 java.lang.String vectorColorBarLabel
          Label of the color legend (e.g. the used unit).
 float vectorColorBarUnitConversion
          Conversion factor of the color bar labels to assign the colors to values in a different unit than pixel.
 java.awt.Color vectorColorInvalid
          Color of invalid vectors (negative value in fifth column).
 int vectorColorLevels
          The number of color levels for the color coding.
 double vectorHeadLength
          Fraction of vector length used by the arrow head.
 boolean vectorMultiColor
          Set true to use a color code for the vector length.
 float vectorMultiColorMax
          Value represented by the highest color (red).
 float vectorMultiColorMin
          Value represented by the lowest color (blue).
 float vectorMultiColorTransparancy
          Transparancy (0=fully transparent, 1=fully opaque).
 java.lang.String vectorReferenceLabel
          Label of the reference vector (e.g. the unit used).
 float vectorReferenceLength
          Length of the reference vector in pixel.
 float vectorReferenceUnitConversion
          Conversion factor to draw the reference vector in a different unit than pixel.
 float vectorScale
          Scaling factor for plotting vectors.
 boolean vectorShowColorBar
          Set true to display a color legend.
 boolean vectorShowReference
          Set true to plot a reference vector.
 float vectorTickSpacing
          The spacing of the axes tickmarks.
 int vectorXOffset
          The width of the space between plot border and left upright axis.
 int vectorYOffset
          The space between plot border and the top horizontal axis.
 float vectorZoom
          Scaling factor for the vector plot.
 
Constructor Summary
Settings()
          Creates a new instance of Settings.
 
Method Summary
 void setExportCorrFunction(boolean export, int num, int pass)
          Specify the export of sample correlation functions into the users home directory.
 void setPivDefaultDestFileName(java.lang.String defaultDestFileName)
          Set the default file name for PIV output
 void setPivShearIntWindows(boolean shearIntWindows)
          Enable (true) or disable (false) window deformation.
 void setPivUseDefaultDestFileName(boolean useDefaultDestFileName)
          Do not ask for a vector file name, use the default file name.
 void setPivUseImageBaseName(boolean useImageBaseName)
          Do not ask for a vector file name, use the image name.
 void setThirdCompReconDz(double dz)
          Specify the distance between two measurement planes for the reconstruction of the third component (based on the assumption of mass-conservation).
 void setThirdCompReconLinReg(boolean useLinReg)
          Specify whether to base the third component reconstruction on central differences or on a linear regression over five points.
 void setThirdCompReconSkip(int skip)
          Specify the number of measurement planes to skip.
 void setVectorBackgroundImagePath(java.lang.String path)
          Define a path for the background image for vector plots.
 void setVectorColorBarFormatString(java.lang.String format)
          Set the number format for the color bar next to a color coded vector plot.
 void setVectorMultiColorTransparancy(float f)
          Enable transparency for the multi colors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

loadSaveTecplotHeader

public boolean loadSaveTecplotHeader
Set true to save vector files with a Tecplot header.


cmdNumOfLines

public int cmdNumOfLines
Maximum number of lines in history.


cmdLineWrap

public boolean cmdLineWrap
Set true to wrap lines. A horizontal scroll bar will be shown otherwise to display long lines.


jpivLibPath

public java.lang.String jpivLibPath
Location of additional files, like native libraries, documentation, scripts.


vectorScale

public float vectorScale
Scaling factor for plotting vectors.


vectorHeadLength

public double vectorHeadLength
Fraction of vector length used by the arrow head.


vectorAngle

public int vectorAngle
Opening angle of the arrow head.


vectorBackground

public java.awt.Color vectorBackground
Color of the vector plot background.


vectorBackgroundImage

public boolean vectorBackgroundImage
Set true to use a pixel image as background.


vectorBackgroundImagePath

public java.lang.String vectorBackgroundImagePath
Location of the background image.


vectorBackgroundColorCoding

public boolean vectorBackgroundColorCoding
Set true to create a color coded background, based on the values in the specified data column (e.g. vorticity).


vectorBackgroundColorCodingColumn

public int vectorBackgroundColorCodingColumn
Specifys the column number used for the color coded background, zero for the first column.


vectorBackgroundColorCodingMin

public float vectorBackgroundColorCodingMin
Value used for the lowest color (blue).


vectorBackgroundColorCodingMax

public float vectorBackgroundColorCodingMax
Value used for the highest color (red).


vectorColor

public java.awt.Color vectorColor
Color of the vectors.


vectorColorInvalid

public java.awt.Color vectorColorInvalid
Color of invalid vectors (negative value in fifth column).


shapeColor

public java.awt.Color shapeColor
Color of shapes (e.g. profiles).


labelInvalidVectors

public boolean labelInvalidVectors
Set true to plot invalid vectors in the specified color.


vectorZoom

public float vectorZoom
Scaling factor for the vector plot.


vectorShowReference

public boolean vectorShowReference
Set true to plot a reference vector.


vectorReferenceUnitConversion

public float vectorReferenceUnitConversion
Conversion factor to draw the reference vector in a different unit than pixel.


vectorReferenceLength

public float vectorReferenceLength
Length of the reference vector in pixel.


vectorReferenceLabel

public java.lang.String vectorReferenceLabel
Label of the reference vector (e.g. the unit used).


vectorMultiColor

public boolean vectorMultiColor
Set true to use a color code for the vector length.


vectorMultiColorMin

public float vectorMultiColorMin
Value represented by the lowest color (blue).


vectorMultiColorMax

public float vectorMultiColorMax
Value represented by the highest color (red).


vectorMultiColorTransparancy

public float vectorMultiColorTransparancy
Transparancy (0=fully transparent, 1=fully opaque).


vectorShowColorBar

public boolean vectorShowColorBar
Set true to display a color legend.


vectorColorBarFormatString

public java.lang.String vectorColorBarFormatString
Define a decimal format for the color bar. Default is scientific format: ##0.000E00.


vectorColorBarUnitConversion

public float vectorColorBarUnitConversion
Conversion factor of the color bar labels to assign the colors to values in a different unit than pixel.


vectorColorBarLabel

public java.lang.String vectorColorBarLabel
Label of the color legend (e.g. the used unit).


vectorBorder

public java.awt.Color vectorBorder
The background color outside the vector field.


vectorAxes

public java.awt.Color vectorAxes
The color of the plot axes.


vectorTickSpacing

public float vectorTickSpacing
The spacing of the axes tickmarks.


vectorAxisScaling

public float vectorAxisScaling
The scaling of the axis labels (e.g. for unit conversion).


vectorAxisLabel

public java.lang.String vectorAxisLabel
The label of the axes (e.g. the unit).


vectorColorLevels

public int vectorColorLevels
The number of color levels for the color coding.


vectorXOffset

public int vectorXOffset
The width of the space between plot border and left upright axis.


vectorYOffset

public int vectorYOffset
The space between plot border and the top horizontal axis.


imgTwoFrames

public boolean imgTwoFrames
Treat imges as double frame imgages if true.


imgZoom

public float imgZoom
Zoom factor for image display.


PIV_TWO_IMG

public static final int PIV_TWO_IMG
Constant. PIV evaluation between frames in double frame images.

See Also:
Constant Field Values

PIV_CONSECUTIVE

public static final int PIV_CONSECUTIVE
Constant. PIV evaluation between consecutive images in a list.

See Also:
Constant Field Values

PIV_SKIP

public static final int PIV_SKIP
Constant. PIV evaluation between single images with a number of skipped images in between.

See Also:
Constant Field Values

PIV_CASCADE

public static final int PIV_CASCADE
Constant. PIV evaluation between single images with increasing number of skipped images in between.

See Also:
Constant Field Values

pivSequence

public int pivSequence
One of the constants PIV_TOW_IMG, PIV_CONSECUTIVE, PIV_SKIP, PIV_CASCADE to define which images to correlate with each other.


pivSkip

public int pivSkip
The number of images to skip if pivSequence==PIV_SKIP.


pivSumOfCorr

public boolean pivSumOfCorr
Sum up all correlation functions of an ensemble before searching the correlation peak position.


pivShearIntWindows

public boolean pivShearIntWindows
Use window deformation to enhance accuracy.


pivUseImageBaseName

public boolean pivUseImageBaseName
Set true to use the image base name as the default output filename.


pivUseDefaultDestFileName

public boolean pivUseDefaultDestFileName
Set true to use a default or software set destination file name.


pivDefaultDestFileName

public java.lang.String pivDefaultDestFileName

pivMultiPass

public int pivMultiPass
Number of passes.


pivWindow

public int[][] pivWindow
Definition of the interrogation window size, search domain size and vector spacing.


pivROI

public boolean pivROI
Constricts the PIV evaluation on a region of interest if true.


pivROIP1x

public int pivROIP1x
Upper, left boundary of region of interest.


pivROIP1y

public int pivROIP1y
Upper, top boundary of region of interest.


pivROIP2x

public int pivROIP2x
Lower, right boundary of region of interest.


pivROIP2y

public int pivROIP2y
Lower, bottom boundary of region of interes.


pivHorPreShift

public int pivHorPreShift
Horizontal pre-shift of the interrogation window during the first pass.


pivVerPreShift

public int pivVerPreShift
Vertical pre-shift of the interrogation window during the first pass.


pivNormMedianTest

public boolean pivNormMedianTest
Perform a normalized median test between the passes.


pivReplace

public boolean pivReplace
Replace invaldid vectors by the median between the passes.


pivMedian

public boolean pivMedian
Apply a median filter between the passes.


pivSmoothing

public boolean pivSmoothing
Use 3x3 smoothing (average) between the passes.


singlePixelTwoImg

public boolean singlePixelTwoImg
During single pixel ensemble evaluation, treat images as double frame images.


singlePixelROI

public boolean singlePixelROI
Constrict the single pixel ensemble evaluation to a region of interest.


singlePixelROIP1x

public int singlePixelROIP1x
Upper, left border of region of interst.


singlePixelROIP1y

public int singlePixelROIP1y
Upper, top border of region of interst.


singlePixelROIP2x

public int singlePixelROIP2x
Lower, right border of region of interst.


singlePixelROIP2y

public int singlePixelROIP2y
Lower, bottom border of region of interest.


singlePixelDomainWidth

public int singlePixelDomainWidth
Search domain widht for single pixel correlation.


singlePixelDomainHeight

public int singlePixelDomainHeight
Search domain hight for single pixel correlation.


singlePixelHorPreShift

public int singlePixelHorPreShift
Horizontal pre-shift for single pixel correlation.


singlePixelVerPreShift

public int singlePixelVerPreShift
Vertical pre-shift for single pixel correlation.


singlePixelCreatePreShiftVectorField

public boolean singlePixelCreatePreShiftVectorField
First do a standard-PIV evaluation to create a pre-shift vector field, if true.


singlePixel3by3

public boolean singlePixel3by3
Use 3x3 pixel direct correlation, instead of single pixel correlation. Reduces the amount of neccessary images by a factor of about two.


singlePixelSignalOnly

public boolean singlePixelSignalOnly
Considers only pixel whose value is above the average value. Speeds up the calculation and significantly reduces noise. The threshold might be chosen a bit to high, this might be object of optimization in a future version.


profilePrintStat

public boolean profilePrintStat
If true, print some statistics to standard output, when a profile is drawn into a vector plot.


profilePrintData

public boolean profilePrintData
Prints the data of the interpolated profile to standard output, if true.


profileQuadInterp

public boolean profileQuadInterp
Use a quadratic interpolation between the points of a profile.


profileAverage

public boolean profileAverage
Calculate the average of a number of parallel profiles.


profileNumberOf

public int profileNumberOf
Number of profiles to average.


profileDistance

public int profileDistance
Distance between profiles.


profileFixDataPoints

public boolean profileFixDataPoints
Create a fixed number of data points, independent on the length of the profile.


profileNumOfFixDataPoints

public int profileNumOfFixDataPoints
Specify the number of data points along the profile.


normMedianTestNoiseLevel

public double normMedianTestNoiseLevel
Noise Level of the normalized median test (0.1 is a good starting point).


normMedianTestThreshold

public double normMedianTestThreshold
Threshold of the normalized median test (2 is a good starting point).


invalidateIsolatedVectorsNumOfNeighbours

public int invalidateIsolatedVectorsNumOfNeighbours
Invalidate a vector if it has less direct valid neighbours than specified.


subsRefDispDx

public double subsRefDispDx
Substract a reference displacement, horizontal component.


subsRefDispDy

public double subsRefDispDy
Substract a reference displacement, vertical component.


thirdCompReconDz

public double thirdCompReconDz
Distance between measurement planes (for third component reconstruction based on mass conservation).


thirdCompReconSkip

public int thirdCompReconSkip
Skip measurement planes (for third component reconstruction based on mass conservation).


thirdCompReconLinReg

public boolean thirdCompReconLinReg
The first step of the third component reconstruction is the calculation of the first derivative of the velocity field. Normally this calculation uses central differences (thirdCompReconLinReg = false). You may try calculating the first derivative based on a linear regression of five points (thirdCompReconLinReg = true). This method is more robust against noise.


exportCorrFunction

public boolean exportCorrFunction
If true, a sample ensemble correlation functions is exported every loop.


exportCorrFunctionNum

public int exportCorrFunctionNum
Number of the correlation function to export (starting from upper left corner).


exportCorrFunctionPass

public int exportCorrFunctionPass
Specify pass when to export the correlation function.

Constructor Detail

Settings

public Settings()
Creates a new instance of Settings.

Method Detail

setVectorBackgroundImagePath

public void setVectorBackgroundImagePath(java.lang.String path)
Define a path for the background image for vector plots.

Parameters:
path - The complete path of the background image.

setVectorMultiColorTransparancy

public void setVectorMultiColorTransparancy(float f)
Enable transparency for the multi colors.

Parameters:
f - A value between 0 (completely transparent) and 1 (opaque).

setVectorColorBarFormatString

public void setVectorColorBarFormatString(java.lang.String format)
Set the number format for the color bar next to a color coded vector plot.

Parameters:
format - A format string. The default is "##0.000E00"
See Also:
DecimalFormat

setPivShearIntWindows

public void setPivShearIntWindows(boolean shearIntWindows)
Enable (true) or disable (false) window deformation.

Parameters:
shearIntWindows - Deform interrogation windows (true) or not (false).

setPivUseImageBaseName

public void setPivUseImageBaseName(boolean useImageBaseName)
Do not ask for a vector file name, use the image name.

Parameters:
useImageBaseName - Do not ask the user for the output file name, if true.

setPivUseDefaultDestFileName

public void setPivUseDefaultDestFileName(boolean useDefaultDestFileName)
Do not ask for a vector file name, use the default file name.

Parameters:
useDefaultDestFileName - Do not ask the user for the output file name, if true.

setPivDefaultDestFileName

public void setPivDefaultDestFileName(java.lang.String defaultDestFileName)
Set the default file name for PIV output

Parameters:
defaultDestFileName - The new default filename for output.

setThirdCompReconDz

public void setThirdCompReconDz(double dz)
Specify the distance between two measurement planes for the reconstruction of the third component (based on the assumption of mass-conservation).

Parameters:
dz - The distance between to measurement planes.

setThirdCompReconSkip

public void setThirdCompReconSkip(int skip)
Specify the number of measurement planes to skip.

Parameters:
skip - The number of planes to skip, 0 for using every plane

setThirdCompReconLinReg

public void setThirdCompReconLinReg(boolean useLinReg)
Specify whether to base the third component reconstruction on central differences or on a linear regression over five points.

Parameters:
useLinReg - True for using a linear regression instead of central differences.

setExportCorrFunction

public void setExportCorrFunction(boolean export,
                                  int num,
                                  int pass)
Specify the export of sample correlation functions into the users home directory.

Parameters:
export - If true, a sample ensemble correlation function is exported.
num - Number of the correlation function to export (starting from upper left corner).
pass - Specify the pass when to export the correlation function (0 for all).