public class SequenceFileGroupImporter extends AbstractImageProvider implements SequenceFileImporter
SequenceFileSticher.SequenceFileGroup
) to build a single Sequence out of it.DEFAULT_THUMBNAIL_SIZE
FLAG_METADATA_ALL, FLAG_METADATA_MASK, FLAG_METADATA_MINIMUM
Constructor and Description |
---|
SequenceFileGroupImporter() |
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. |
void |
closeInternalsImporters()
Close all opened internals importer without closing the Group Importer itself (importer remaing active)
|
java.util.List<javax.swing.filechooser.FileFilter> |
getFileFilters()
Return the supported FileFilter for this importer.
|
IcyBufferedImage |
getImage(int series,
int resolution,
java.awt.Rectangle rectangle,
int z,
int t,
int c)
Returns the image located at specified position.
|
SequenceFileImporter |
getImporter(java.lang.String path)
Return an opened importer for given path.
|
loci.formats.ome.OMEXMLMetadataImpl |
getMetaData() |
ome.xml.meta.OMEXMLMetadata |
getOMEXMLMetaData()
Returns the image metadata in OME format (metadata provides many informations about the image).
|
java.lang.String |
getOpened()
Return the current / last loaded image without the image group
|
SequenceFileSticher.SequenceFileGroup |
getOpenedGroup() |
java.lang.String |
getPath(int z,
int t,
int c) |
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.
|
IcyBufferedImage |
getThumbnail(int series)
Returns the image thumbnail for the specified series of the image.
|
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 |
isOpen() |
boolean |
isStitchedImage() |
void |
open(java.util.Collection<java.lang.String> ids,
int flags)
Open a list of ids
|
void |
open(SequenceFileSticher.SequenceFileGroup group,
int flags)
Open a SequenceFileGroup
|
boolean |
open(java.lang.String path,
int flags)
Deprecated.
Better to use
open(Collection, int) or #open(SequenceFileGroup, int) for this importer |
void |
releaseImporter(java.lang.String path,
SequenceFileImporter importer)
Release the importer obtained through
getImporter(String) to the importer pool. |
getImage, getImage, getImage, getImage, getImage, getPixelsByTile, getResolutionFactor, getResolutionFactor, isResolutionAvailable
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getImage, getImage, getImage, getImage, getImage, isResolutionAvailable
public SequenceFileGroupImporter()
public boolean acceptFile(java.lang.String path)
SequenceFileImporter
true
if the specified file can be opened by the importeracceptFile
in interface SequenceFileImporter
public java.util.List<javax.swing.filechooser.FileFilter> getFileFilters()
SequenceFileImporter
getFileFilters
in interface SequenceFileImporter
public boolean isOpen()
true
if a opened is currently openedpublic java.lang.String getOpened()
getOpened
in interface SequenceFileImporter
getOpened
in interface SequenceIdImporter
null
otherwise.FileUtil.getGenericPath(String)
method).SequenceFileImporter.open(String, int)
,
SequenceIdImporter.close()
public SequenceFileSticher.SequenceFileGroup getOpenedGroup()
@Deprecated 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.open
in interface SequenceFileImporter
open
in interface SequenceIdImporter
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 open(java.util.Collection<java.lang.String> ids, int flags)
ids
- public void open(SequenceFileSticher.SequenceFileGroup group, int flags)
public SequenceFileImporter getImporter(java.lang.String path) throws java.io.IOException, UnsupportedFormatException
releaseImporter(String, SequenceFileImporter)
when you're done with it.java.io.IOException
UnsupportedFormatException
releaseImporter(String, SequenceFileImporter)
public void releaseImporter(java.lang.String path, SequenceFileImporter importer)
getImporter(String)
to the importer pool.getImporter(String)
public boolean isStitchedImage()
true
if this image group requires several images to build a full XY plan image.public java.lang.String getPath(int z, int t, int c)
public void closeInternalsImporters() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
SequenceIdImporter
SequenceIdImporter.open(String, int)
method.close
in interface SequenceIdImporter
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public loci.formats.ome.OMEXMLMetadataImpl getMetaData() throws UnsupportedFormatException, java.io.IOException
getMetaData
in interface ImageProvider
UnsupportedFormatException
java.io.IOException
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 AbstractImageProvider
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 AbstractImageProvider
series
- Series index for multi series image (use 0 if unsure).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 AbstractImageProvider
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 AbstractImageProvider
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
getImage
in interface 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 getThumbnail(int series) throws UnsupportedFormatException, java.io.IOException
ImageProvider
getThumbnail
in interface ImageProvider
getThumbnail
in class AbstractImageProvider
series
- Series index for multi series image (use 0 if unsure).UnsupportedFormatException
java.io.IOException