|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfable.python.FabioFile
public class FabioFile
The FabioFile class is used to read files using the Python fabio package. It uses the Jep interpreter to call Python. It can be used in multi-threaded Java environments. Different thread should supply their own Jep interpreter. The image data is stored in a cache so that the last N images will be read from the cache and not from disk. This will be reflected in the time to read i.e. it will be zero. The cache size can be increased in function of the memory available. It is currently set to 20 i.e. 20*16 MB.
Field Summary | |
---|---|
boolean |
headerRead
|
boolean |
imageRead
|
Constructor Summary | |
---|---|
FabioFile(java.lang.String _fullFileName)
Create a FabioFile object which be able to read Fabio files via the fabio Python module. |
Method Summary | |
---|---|
void |
acquire()
|
void |
addHeaderInfo(java.lang.String key,
java.lang.String value)
Add new key in header info |
void |
addIndex(int index)
Gaelle : add a sample Vector index for this fabioFile |
int |
compareTo(java.lang.Object other)
|
int |
compareTo(java.lang.String key,
java.lang.Object other)
|
int |
getBytesPerPixel()
|
java.lang.String |
getFileName()
return short file name i.e. |
java.lang.String |
getFileNumber()
|
boolean |
getFlag()
|
java.lang.String |
getFullFilename()
|
java.lang.String |
getFullFileName()
|
int |
getHeight()
get image height |
float[] |
getImageAsFloat()
Return image as floating pint array |
float[] |
getImageAsFloat(FableJep jep)
Return image as floating pint array |
int[] |
getImageAsInt()
return image as int by converting the float image to int, do not keep the image in memory |
java.lang.String[] |
getKeys()
|
java.util.Vector<java.lang.String> |
getKeysAsListedInHeader()
|
float |
getMaximum()
return maximum value in image |
float |
getMean()
return mean value in image |
float |
getMinimum()
return minimum value in image |
java.lang.String |
getStems()
8 janv. |
long |
getTimeToReadImage()
get time to read image in ms |
java.lang.String |
getValue(java.lang.String key)
|
int |
getWidth()
get image width |
void |
loadHeader()
Load only the header and not the image. |
void |
loadHeader(FableJep fableJep)
Load only the header and not the image. |
void |
propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
|
void |
readImage()
read image into memory |
void |
readImageAsFloat()
read image as float into memory |
void |
readImageAsFloat(FableJep fableJep)
read image as float into memory |
void |
release()
|
void |
setFlag(boolean b)
|
void |
setFullFileName(java.lang.String fullfilename)
Set the fullfilename of fabio file if different from header |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public boolean headerRead
public boolean imageRead
Constructor Detail |
---|
public FabioFile(java.lang.String _fullFileName) throws FabioFileException
fileName
-
FabioFileException
Method Detail |
---|
public void acquire()
public void release()
public void setFullFileName(java.lang.String fullfilename)
fullfilename
- public java.lang.String getFullFileName()
public java.lang.String toString()
toString
in class java.lang.Object
public void loadHeader() throws FabioFileException
FabioFileException
java.lang.Throwable
public void loadHeader(FableJep fableJep) throws FabioFileException
FabioFileException
public void addHeaderInfo(java.lang.String key, java.lang.String value)
public java.lang.String[] getKeys() throws FabioFileException, java.lang.Throwable
FabioFileException
java.lang.Throwable
public java.util.Vector<java.lang.String> getKeysAsListedInHeader() throws FabioFileException, java.lang.Throwable
FabioFileException
java.lang.Throwable
public java.lang.String getValue(java.lang.String key) throws FabioFileException
key
- the header key
FabioFileException
java.lang.Throwable
public void addIndex(int index)
index
- index in sample vector filepublic java.lang.String getFullFilename()
public java.lang.String getFileName()
public long getTimeToReadImage()
public java.lang.String getStems()
public java.lang.String getFileNumber()
public int getWidth() throws java.lang.Throwable
java.lang.Throwable
public int getHeight() throws java.lang.Throwable
java.lang.Throwable
public int getBytesPerPixel()
public void readImage() throws java.lang.Throwable
java.lang.Throwable
public void readImageAsFloat() throws java.lang.Throwable
java.lang.Throwable
public void readImageAsFloat(FableJep fableJep) throws java.lang.Throwable
java.lang.Throwable
public float[] getImageAsFloat() throws java.lang.Throwable
java.lang.Throwable
public float[] getImageAsFloat(FableJep jep)
public int[] getImageAsInt() throws java.lang.Throwable
java.lang.Throwable
public float getMinimum() throws java.lang.Throwable
java.lang.Throwable
public float getMaximum() throws java.lang.Throwable
java.lang.Throwable
public float getMean() throws java.lang.Throwable
java.lang.Throwable
public void setFlag(boolean b)
public boolean getFlag()
public int compareTo(java.lang.Object other)
compareTo
in interface java.lang.Comparable<java.lang.Object>
public int compareTo(java.lang.String key, java.lang.Object other)
key
- the key used to sortother
- the fableFile
public void propertyChange(org.eclipse.jface.util.PropertyChangeEvent event)
propertyChange
in interface org.eclipse.jface.util.IPropertyChangeListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |