public class SVSImageExtractor extends SwingWorker<Boolean,Void>
SwingWorker.StateValue| Modifier and Type | Field and Description |
|---|---|
private boolean |
allHeightsEqual |
private boolean |
allWidthsEqual |
private static Class<?> |
caller |
private int |
extension |
private Vector<File> |
extractedFiles |
private File[] |
files |
private int |
firstHeight |
private int |
firstWidth |
private int |
imageToLoad |
private int |
interP |
private static org.apache.log4j.Logger |
logger |
(package private) int |
numImages |
private int[] |
params
Default parameters for the image extraction: first image, no rescale,
bilinear interpolation, tif extension.
|
private int |
rescale |
private float |
theRatioH |
private float |
theRatioW |
| Constructor and Description |
|---|
SVSImageExtractor() |
| Modifier and Type | Method and Description |
|---|---|
private File |
appendTextToImageName(File file,
String strAppend)
This method appends String(num) to the image name
|
protected Boolean |
doInBackground() |
protected void |
done() |
boolean |
extract(File[] files,
int[] params)
This method extracts the files with the given params.
|
int |
getExtension() |
Vector<File> |
getExtractedFiles() |
File[] |
getFiles() |
int |
getFirstHeight() |
int |
getFirstWidth() |
int |
getImageToLoad() |
int |
getInterP() |
int |
getNumImages() |
int[] |
getParams() |
int |
getRescale() |
private int[] |
getSizeOfFirstImg(File file)
Retrieve the Size of the first image in an SVS file stack.
|
float |
getTheRatioH() |
float |
getTheRatioW() |
boolean |
isAllHeightsEqual() |
boolean |
isAllWidthsEqual() |
Object[][] |
readImageMetaData(File file)
This method reads out the image information from a specified image
file. |
private javax.media.jai.PlanarImage |
rescaleImage(javax.media.jai.PlanarImage pi,
int rescale,
int optIntP)
This method rescales an instance of PlanarImage (pi) using a given
interpolation method (optIntP).
|
void |
setAllHeightsEqual(boolean allHeightsEqual) |
void |
setAllWidthsEqual(boolean allWidthsEqual) |
void |
setExtension(int extension) |
void |
setExtractedFiles(Vector<File> extractedFiles) |
void |
setFiles(File[] files) |
void |
setFirstHeight(int firstHeight) |
void |
setFirstWidth(int firstWidth) |
void |
setImageToLoad(int imageToLoad) |
void |
setInterP(int interP) |
void |
setNumImages(int numImages) |
void |
setParams(int[] params) |
void |
setRescale(int rescale) |
void |
setTheRatioH(float theRatioH) |
void |
setTheRatioW(float theRatioW) |
addPropertyChangeListener, cancel, execute, firePropertyChange, get, get, getProgress, getPropertyChangeSupport, getState, isCancelled, isDone, process, publish, removePropertyChangeListener, run, setProgressprivate static Class<?> caller
private static final org.apache.log4j.Logger logger
private int[] params
private File[] files
private int imageToLoad
private int rescale
private int interP
private int extension
private int firstWidth
private int firstHeight
int numImages
private float theRatioW
private float theRatioH
private boolean allWidthsEqual
private boolean allHeightsEqual
public Object[][] readImageMetaData(File file) throws UnreadableSVSFileException
file.file - - the specified file to be readUnreadableSVSFileExceptionprivate javax.media.jai.PlanarImage rescaleImage(javax.media.jai.PlanarImage pi,
int rescale,
int optIntP)
pi - rescale - optIntP - private int[] getSizeOfFirstImg(File file)
file - public boolean extract(File[] files, int[] params)
files - - the file listparams - - parameters for processing the file list:
true if successful, false otherwiseprivate File appendTextToImageName(File file, String strAppend)
protected Boolean doInBackground() throws Exception
doInBackground in class SwingWorker<Boolean,Void>Exceptionprotected void done()
done in class SwingWorker<Boolean,Void>public int[] getParams()
public int getImageToLoad()
public int getRescale()
public int getInterP()
public int getExtension()
public int getFirstWidth()
public int getFirstHeight()
public int getNumImages()
public float getTheRatioW()
public float getTheRatioH()
public boolean isAllWidthsEqual()
public boolean isAllHeightsEqual()
public void setParams(int[] params)
params - the params to setpublic void setImageToLoad(int imageToLoad)
imageToLoad - the imageToLoad to setpublic void setRescale(int rescale)
rescale - the rescale to setpublic void setInterP(int interP)
interP - the interP to setpublic void setExtension(int extension)
extension - the extension to setpublic void setFirstWidth(int firstWidth)
firstWidth - the firstWidth to setpublic void setFirstHeight(int firstHeight)
firstHeight - the firstHeight to setpublic void setNumImages(int numImages)
numImages - the numImages to setpublic void setTheRatioW(float theRatioW)
theRatioW - the theRatioW to setpublic void setTheRatioH(float theRatioH)
theRatioH - the theRatioH to setpublic void setAllWidthsEqual(boolean allWidthsEqual)
allWidthsEqual - the allWidthsEqual to setpublic void setAllHeightsEqual(boolean allHeightsEqual)
allHeightsEqual - the allHeightsEqual to setpublic File[] getFiles()
public void setFiles(File[] files)
files - the files to setCopyright © 2009–2017 Helmut Ahammer, Philipp Kainz. All rights reserved.