public class LociImporterPlugin extends PluginSequenceFileImporter
FLAG_METADATA_ALL, FLAG_METADATA_MASK, FLAG_METADATA_MINIMUM
Constructor and Description |
---|
LociImporterPlugin() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptFile(java.lang.String path)
Return
true if the specified file can be opened by the importer |
void |
close()
Close the image which has been previously opened with
SequenceIdImporter.open(String, int) method. |
java.util.List<javax.swing.filechooser.FileFilter> |
getFileFilters()
Return the supported FileFilter for this importer.
|
static IcyBufferedImage |
getImage(loci.formats.IFormatReader reader,
java.awt.Rectangle rect,
int z,
int t)
Load the image located at (Z, T) position from the specified IFormatReader
and return it as an IcyBufferedImage. |
static IcyBufferedImage |
getImage(loci.formats.IFormatReader reader,
java.awt.Rectangle rect,
int z,
int t,
int c)
Load a single channel sub image at (Z, T, C) position from the specified
IFormatReader and returns it as an IcyBufferedImage. |
static IcyBufferedImage |
getImage(loci.formats.IFormatReader reader,
java.awt.Rectangle rect,
int z,
int t,
int c,
int downScaleLevel)
Load a single channel sub image at (Z, T, C) position from the specified
IFormatReader and returns it as an IcyBufferedImage. |
IcyBufferedImage |
getImage(int series,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the image located at specified position.
|
IcyBufferedImage |
getImageByTile(int series,
int resolution,
java.awt.Rectangle region,
int z,
int t,
int c,
int tileW,
int tileH,
ProgressListener listener) |
static IcyBufferedImage |
getImageCompatible(loci.formats.IFormatReader reader,
int z,
int t)
Load the image located at (Z, T) position from the specified IFormatReader
and return it as an IcyBufferedImage (compatible and slower method). |
loci.formats.ome.OMEXMLMetadataImpl |
getMetaData()
Deprecated.
|
ome.xml.meta.OMEXMLMetadata |
getOMEXMLMetaData()
Returns the image metadata in OME format (metadata provides many informations about the image).
|
java.lang.String |
getOpened() |
java.lang.Object |
getPixels(int series,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the pixel data located for specified position of the image.
|
java.lang.Object |
getPixelsByTile(int series,
int resolution,
java.awt.Rectangle region,
int z,
int t,
int c,
int tileW,
int tileH,
ProgressListener listener)
|
loci.formats.IFormatReader |
getReader()
Returns a reader to use for the current thread (allocate it if needed).
|
boolean |
getReadOriginalMetadata()
When set to
true the importer will also read original metadata (as
annotations) |
static IcyBufferedImage |
getThumbnail(loci.formats.IFormatReader reader,
int z,
int t)
Load a thumbnail version of the image located at (Z, T) position from the specified
IFormatReader and
returns it as an IcyBufferedImage. |
static IcyBufferedImage |
getThumbnail(loci.formats.IFormatReader reader,
int z,
int t,
int c)
Load a thumbnail version of the image located at (Z, T, C) position from the specified
IFormatReader and returns it as an IcyBufferedImage. |
IcyBufferedImage |
getThumbnail(int series)
Returns the image thumbnail for the specified series of the image.
|
static IcyBufferedImage |
getThumbnailCompatible(loci.formats.IFormatReader reader,
int z,
int t)
Load a thumbnail version of the image located at (Z, T) position from the specified
IFormatReader and returns it as an IcyBufferedImage. |
static IcyBufferedImage |
getThumbnailCompatible(loci.formats.IFormatReader reader,
int z,
int t,
int c)
Load a thumbnail version of the image located at (Z, T, C) position from the specified
IFormatReader and returns it as an IcyBufferedImage. |
int |
getTileHeight(int series)
Returns the (optimal) tile height for the specified series of the image.
|
int |
getTileWidth(int series)
Returns the (optimal) tile width for the specified series of the image.
|
boolean |
isGroupFiles()
When set to
true the importer will try to group files required for the whole
dataset. |
boolean |
isOpen(java.lang.String path) |
boolean |
isResolutionAvailable(int series,
int resolution)
Returns
true if the given sub resolution is available from this series. |
boolean |
open(java.lang.String path,
int flags)
Open the image designed by the specified file
path to allow image data / metadata access. |
void |
releaseReader(loci.formats.IFormatReader r)
Release the reader obtained through
getReader() to the reader pool. |
void |
setGroupFiles(boolean value)
When set to
true the importer will try to group files required for the whole
dataset. |
void |
setReadOriginalMetadata(boolean value)
When set to
true the importer will also read original metadata (as annotations). |
getImage, getImage, getImage, getImage, getImage, getResolutionFactor
addIcyFrame, addSequence, getActiveImage, getActiveSequence, getActiveViewer, getDescriptor, getFocusedImage, getFocusedSequence, getFocusedViewer, getIconResource, getImageResource, getInstallFolder, getName, getOwnerClassName, getPlugin, getPreferences, getPreferencesRoot, getResource, getResourceAsStream, getResources, getSequences, isBundled, loadLibrary, prepareLibrary, removeSequence, report, toString
public LociImporterPlugin()
public boolean getReadOriginalMetadata()
true
the importer will also read original metadata (as
annotations)setReadOriginalMetadata(boolean)
public void setReadOriginalMetadata(boolean value)
true
the importer will also read original metadata (as annotations).public boolean isGroupFiles()
true
the importer will try to group files required for the whole
dataset.public void setGroupFiles(boolean value)
true
the importer will try to group files required for the whole
dataset.public java.util.List<javax.swing.filechooser.FileFilter> getFileFilters()
SequenceFileImporter
public boolean acceptFile(java.lang.String path)
SequenceFileImporter
true
if the specified file can be opened by the importerpublic boolean isOpen(java.lang.String path)
public java.lang.String getOpened()
null
otherwise.FileUtil.getGenericPath(String)
method).SequenceFileImporter.open(String, int)
,
SequenceIdImporter.close()
public boolean open(java.lang.String path, int flags) throws UnsupportedFormatException, java.io.IOException
SequenceFileImporter
path
to allow image data / metadata access.SequenceIdImporter.close()
to close the image when you're done.path
- Path of the image file to open.flags
- operation flag:SequenceIdImporter.FLAG_METADATA_MINIMUM
= load minimum metadata informationsSequenceIdImporter.FLAG_METADATA_ALL
= load all metadata informationstrue
if the operation has succeeded and false
otherwise.UnsupportedFormatException
java.io.IOException
public void close() throws java.io.IOException
SequenceIdImporter
SequenceIdImporter.open(String, int)
method.java.io.IOException
public loci.formats.IFormatReader getReader() throws loci.formats.FormatException, java.io.IOException
releaseReader(IFormatReader)
loci.formats.FormatException
java.io.IOException
releaseReader(IFormatReader)
public void releaseReader(loci.formats.IFormatReader r)
getReader()
to the reader pool.getReader()
public ome.xml.meta.OMEXMLMetadata getOMEXMLMetaData() throws UnsupportedFormatException, java.io.IOException
ImageProvider
MetaDataUtil.getNumSeries(OMEXMLMetadata)
MetaDataUtil.getSizeX(OMEXMLMetadata, int)
MetaDataUtil.getSizeY(OMEXMLMetadata, int)
MetaDataUtil.getSizeZ(OMEXMLMetadata, int)
MetaDataUtil.getSizeT(OMEXMLMetadata, int)
MetaDataUtil.getSizeC(OMEXMLMetadata, int)
MetaDataUtil.getDataType(OMEXMLMetadata, int)
MetaDataUtil.getPositionX(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionY(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionZ(OMEXMLMetadata, int, int, int, int, double)
MetaDataUtil.getPositionT(OMEXMLMetadata, int, long)
MetaDataUtil.getPositionTOffset(OMEXMLMetadata, int, int, int, int, double)
getOMEXMLMetaData
in interface ImageProvider
getOMEXMLMetaData
in class PluginSequenceFileImporter
UnsupportedFormatException
java.io.IOException
@Deprecated public loci.formats.ome.OMEXMLMetadataImpl getMetaData() throws UnsupportedFormatException, java.io.IOException
UnsupportedFormatException
java.io.IOException
public int getTileWidth(int series) throws UnsupportedFormatException, java.io.IOException
ImageProvider
0
if tile loading is not supported and -1
if any tile size
can be used.getTileWidth
in interface ImageProvider
getTileWidth
in class PluginSequenceFileImporter
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public int getTileHeight(int series) throws UnsupportedFormatException, java.io.IOException
ImageProvider
0
if tile loading is not supported and -1
if any tile size
can be used.getTileHeight
in interface ImageProvider
getTileHeight
in class PluginSequenceFileImporter
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public boolean isResolutionAvailable(int series, int resolution) throws UnsupportedFormatException, java.io.IOException
ImageProvider
true
if the given sub resolution is available from this series.IcyBufferedImageUtil.downscaleBy2(IcyBufferedImage, boolean, int)
method.image.originalResolution / (2^resolution)
true
).isResolutionAvailable
in interface ImageProvider
isResolutionAvailable
in class PluginSequenceFileImporter
series
- Series index for multi series image (use 0 if unsure).resolution
- Resolution levelUnsupportedFormatException
java.io.IOException
public IcyBufferedImage getThumbnail(int series) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getThumbnail
in interface ImageProvider
getThumbnail
in class PluginSequenceFileImporter
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public java.lang.Object getPixels(int series, int resolution, java.awt.Rectangle rectangle, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
OMEXMLMetadataImpl.getPixelsType(int)
getPixels
in interface ImageProvider
getPixels
in class PluginSequenceFileImporter
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (2^resolution)
rectangle
- The 2D region we want to retrieve (considering the original image resolution).null
then the whole image is returned.z
- Z position of the image (slice) we want retrieve data fromt
- T position of the image (frame) we want retrieve data fromc
- C position of the image (channel) we want retrieve (-1 is not accepted here).UnsupportedFormatException
java.io.IOException
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImage(int series, int resolution, java.awt.Rectangle rectangle, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
series
- Series index for multi series image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.originalResolution / (2^resolution)
rectangle
- The 2D region we want to retrieve (considering the original image resolution).null
then the whole image is returned.z
- Z position of the image (slice) we want retrievet
- T position of the image (frame) we want retrievec
- C position of the image (channel) we want retrieve (-1 means all channel).UnsupportedFormatException
java.io.IOException
ImageProvider.isResolutionAvailable(int, int)
public IcyBufferedImage getImageByTile(int series, int resolution, java.awt.Rectangle region, int z, int t, int c, int tileW, int tileH, ProgressListener listener) throws UnsupportedFormatException, java.io.IOException
UnsupportedFormatException
java.io.IOException
public java.lang.Object getPixelsByTile(int series, int resolution, java.awt.Rectangle region, int z, int t, int c, int tileW, int tileH, ProgressListener listener) throws UnsupportedFormatException, java.io.IOException
PluginSequenceFileImporter
getPixelsByTile
in class PluginSequenceFileImporter
UnsupportedFormatException
java.io.IOException
public static IcyBufferedImage getThumbnail(loci.formats.IFormatReader reader, int z, int t) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
and
returns it as an IcyBufferedImage.reader
- IFormatReader
z
- Z position of the image to loadt
- T position of the image to loadIcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getThumbnail(loci.formats.IFormatReader reader, int z, int t, int c) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
and returns it as an IcyBufferedImage.reader
- IFormatReader
z
- Z position of the thumbnail to loadt
- T position of the thumbnail to loadc
- Channel indexIcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getThumbnailCompatible(loci.formats.IFormatReader reader, int z, int t) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
and returns it as an IcyBufferedImage.reader
- IFormatReader
z
- Z position of the image to loadt
- T position of the image to loadIcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getThumbnailCompatible(loci.formats.IFormatReader reader, int z, int t, int c) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
and returns it as an IcyBufferedImage.reader
- IFormatReader
z
- Z position of the thumbnail to loadt
- T position of the thumbnail to loadc
- Channel indexIcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getImage(loci.formats.IFormatReader reader, java.awt.Rectangle rect, int z, int t, int c, int downScaleLevel) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
reader
- Reader used to load the imagerect
- Define the image rectangular region we want to retrieve data for (considering current selected image
resolution).null
to retrieve the whole image.z
- Z position of the image to loadt
- T position of the image to loadc
- Channel index to load (-1 = all channels)downScaleLevel
- number of downscale to process (scale level = 1/2^downScaleLevel)IcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getImage(loci.formats.IFormatReader reader, java.awt.Rectangle rect, int z, int t, int c) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
reader
- Reader used to load the imagerect
- Define the image rectangular region we want to retrieve data for (considering current selected image
resolution).null
to retrieve the whole image.z
- Z position of the image to loadt
- T position of the image to loadc
- Channel index to load (-1 = all channels)IcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getImage(loci.formats.IFormatReader reader, java.awt.Rectangle rect, int z, int t) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
reader
- IFormatReader
rect
- Define the image rectangular region we want to retrieve data for (considering current selected image
resolution).null
to retrieve the whole image.z
- Z position of the image to loadt
- T position of the image to loadIcyBufferedImage
java.lang.UnsupportedOperationException
java.lang.OutOfMemoryError
loci.formats.FormatException
java.io.IOException
public static IcyBufferedImage getImageCompatible(loci.formats.IFormatReader reader, int z, int t) throws loci.formats.FormatException, java.io.IOException
reader
- IFormatReader
z
- Z position of the image to loadt
- T position of the image to loadIcyBufferedImage
loci.formats.FormatException
java.io.IOException