public class LociImporterPlugin extends PluginSequenceFileImporter
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. |
IcyBufferedImage |
getImage(int serie,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the image located at specified position.
|
IcyBufferedImage |
getImageByTile(int serie,
int resolution,
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()
Returns the image metadata in OME format.
|
java.lang.String |
getOpened() |
java.lang.Object |
getPixels(int serie,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the pixel data located for specified position of the image.
|
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 serie)
Returns the image thumbnail for the specified serie 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 serie)
Returns the (optimal) tile height for the specified serie of the image.
|
int |
getTileWidth(int serie)
Returns the (optimal) tile width for the specified serie 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 |
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, getTileList
addIcyFrame, addSequence, getActiveImage, getActiveSequence, getActiveViewer, getDescriptor, getFocusedImage, getFocusedSequence, getFocusedViewer, getIconResource, getImageResource, getInstallFolder, getName, getOwnerClassName, getPlugin, getPreferences, getPreferencesRoot, getResource, getResourceAsStream, getResources, getSequences, isBundled, loadLibrary, 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 importer.public 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 (not used yet, keep it to 0)true
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 loci.formats.ome.OMEXMLMetadataImpl getMetaData() throws UnsupportedFormatException, java.io.IOException
ImageProvider
OMEXMLMetadataImpl.getImageCount()
OMEXMLMetadataImpl.getPixelsSizeX(int)
OMEXMLMetadataImpl.getPixelsSizeY(int)
OMEXMLMetadataImpl.getPixelsSizeZ(int)
OMEXMLMetadataImpl.getPixelsSizeT(int)
OMEXMLMetadataImpl.getPixelsSizeC(int)
OMEXMLMetadataImpl.getPixelsSizeX(int)
OMEXMLMetadataImpl.getPixelsType(int)
UnsupportedFormatException
java.io.IOException
public int getTileWidth(int serie) 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
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public int getTileHeight(int serie) 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
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public IcyBufferedImage getThumbnail(int serie) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getThumbnail
in interface ImageProvider
getThumbnail
in class PluginSequenceFileImporter
serie
- Serie index for multi serie image (use 0 if unsure).UnsupportedFormatException
java.io.IOException
public java.lang.Object getPixels(int serie, 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
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
rectangle
- The 2D region we want to retrieve.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
public IcyBufferedImage getImage(int serie, int resolution, java.awt.Rectangle rectangle, int z, int t, int c) throws UnsupportedFormatException, java.io.IOException
ImageProvider
serie
- Serie index for multi serie image (use 0 if unsure).resolution
- Wanted resolution level for the image (use 0 if unsure).image.resolution / (2^resolution)
rectangle
- The 2D region we want to retrieve.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
public IcyBufferedImage getImageByTile(int serie, int resolution, int z, int t, int c, int tileW, int tileH, ProgressListener listener) throws UnsupportedFormatException, java.io.IOException
PluginSequenceFileImporter
getImageByTile
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) throws java.lang.UnsupportedOperationException, java.lang.OutOfMemoryError, loci.formats.FormatException, java.io.IOException
IFormatReader
reader
- Reader used to load the imagerect
- Region we want to retrieve data.null
to retrieve the whole image.z
- Z position of the image to loadt
- T position of the image to loadc
- Channel index to loadIcyBufferedImage
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
- Region we want to retrieve data.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