|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.MiToBo.core.operator.MTBOperator
de.unihalle.informatik.MiToBo.io.images.ImageWriterMTB
@ALDMetaInfo(export=MANDATORY) @ALDAOperator(genericExecutionMode=ALL, level=APPLICATION) public class ImageWriterMTB
Image writer operator to store MTBImage or ImagePlus to disk along with the
image history (.mph) file. This writer operator is based on Bio-Formats, thus the
available formats depend on Bio-Formats (and its available extension). The format is
determined by the given filename extension.
Different formats allow different options, e.g. compression of images or framerate of movies.
If options are set by the available setter-methods that are not applicable to the current format
writer, the options are simply ignored.
The ImageWriterMTB.runOp(..)
throws a special OverwriteException
in case that
the specified file already exists, but the overwrite-flag is set to false
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
de.unihalle.informatik.Alida.operator.ALDOperator.HidingMode |
Field Summary |
---|
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
completeDAG, name, operatorExecutionEventlistenerList, portHashAccess, verbose, versionProvider |
Constructor Summary | |
---|---|
ImageWriterMTB()
|
|
ImageWriterMTB(ij.ImagePlus imp,
String filename)
Image file output operator for ImagePlus objects. |
|
ImageWriterMTB(MTBImage img,
String filename)
Image file output operator for MTBImage objects. |
Method Summary | |
---|---|
void |
addStatusListener(loci.common.StatusListener listener)
|
HashMap<Integer,String> |
getAvailableCodecs()
Return available codecs for movie writers (see Bio-Formats package loci.formats.out.QTWriter) represented by a hashmap. |
String[] |
getAvailableCompression()
Get the available compression methods for the specified file format. |
HashMap<Integer,String> |
getAvailableQualities()
Return available qualities for quicktime movie writers (see Bio-Formats package loci.formats.out.QTWriter) represented by a hashmap. |
Integer |
getCodec()
Get the codec (quicktime only) |
String |
getCompression()
Get the compression type |
String |
getFileName()
Get image filename |
Integer |
getFps()
Get the frames per second for movie writers (*.avi,*.mov). |
boolean |
getIgnoreInvalidStackSpecification()
Get the flag to ignore an invalid stack specification. |
ij.ImagePlus |
getInputImagePlus()
Get ImagePlus that has to be stored to disk |
MTBImage |
getInputMTBImage()
Get MTBImage that has to be stored to disk |
boolean |
getOverwrite()
Get the overwrite permission flag |
Integer |
getQuality()
Get the quality (quicktime only) |
void |
notifyListeners(loci.common.StatusEvent event)
|
protected void |
operate()
|
protected Object |
readResolve()
Init function for deserialized objects. |
void |
removeStatusListener(loci.common.StatusListener listener)
|
void |
setCodec(Integer codec)
Set the codec (quicktime only). |
void |
setCompression(String compression)
Set the compression type |
void |
setFileName(String filename)
Set image filename |
void |
setFps(Integer fps)
Set the frames per second for movie writers (*.avi,*.mov). |
void |
setIgnoreInvalidStackSpecification(boolean ignore)
Set the flag to ignore an invalid stack specification. |
void |
setInputImagePlus(ij.ImagePlus imp)
Set ImagePlus to store to disk |
void |
setInputMTBImage(MTBImage img)
Set MTBImage to store to disk |
void |
setOverwrite(boolean overwrite)
Set the overwrite permission flag |
void |
setQuality(Integer quality)
Set the quality (quicktime only). |
void |
validateCustom()
|
protected void |
writeImagePlus(String filename,
ij.ImagePlus imp)
Write ImagePlus to disk |
protected void |
writeMTBImage(String filename,
MTBImage img)
Write an MTBImage to disk |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDOperator |
---|
addOperatorExecutionProgressEventListener, fieldContained, fireOperatorExecutionProgressEvent, getALDPortHashAccessKey, getConstructionMode, getHidingMode, getInInoutNames, getInInoutNames, getInNames, getInOutNames, getMissingRequiredInputs, getName, getNumParameters, getOutInoutNames, getOutNames, getParameter, getParameterDescriptor, getParameterNames, getSupplementalNames, getVerbose, getVersion, handleOperatorExecutionProgressEvent, isConfigured, print, print, print, printInterface, printInterface, readHistory, reinitializeParameterDescriptors, removeOperatorExecutionProgressEventListener, runOp, runOp, runOp, setConstructionMode, setHidingMode, setName, setParameter, setVerbose, toStringVerbose, unconfiguredItems, validate, validateGeneric, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageWriterMTB() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImageWriterMTB(MTBImage img, String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
img
- image to write to diskfilename
- filename to write the image to. The extension specifies the output format.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public ImageWriterMTB(ij.ImagePlus imp, String filename) throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
imp
- image to write to diskfilename
- filename to write the image to. The extension specifies the output format.
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
Method Detail |
---|
protected void operate() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException, OverwriteException
operate
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
OverwriteException
public void validateCustom() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
validateCustom
in class de.unihalle.informatik.Alida.operator.ALDOperator
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
protected void writeMTBImage(String filename, MTBImage img) throws loci.common.services.DependencyException, loci.common.services.ServiceException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, RuntimeException, loci.formats.FormatException, IOException, ome.xml.model.enums.EnumerationException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
loci.common.services.DependencyException
loci.common.services.ServiceException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
RuntimeException
loci.formats.FormatException
IOException
ome.xml.model.enums.EnumerationException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
protected void writeImagePlus(String filename, ij.ImagePlus imp) throws RuntimeException, loci.formats.FormatException, IOException, loci.common.services.DependencyException, loci.common.services.ServiceException, ome.xml.model.enums.EnumerationException, de.unihalle.informatik.Alida.exceptions.ALDOperatorException, de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
RuntimeException
loci.formats.FormatException
IOException
loci.common.services.DependencyException
loci.common.services.ServiceException
ome.xml.model.enums.EnumerationException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDProcessingDAGException
public String[] getAvailableCompression() throws loci.formats.FormatException
loci.formats.FormatException
public HashMap<Integer,String> getAvailableCodecs() throws loci.formats.FormatException
loci.formats.FormatException
public HashMap<Integer,String> getAvailableQualities() throws loci.formats.FormatException
loci.formats.FormatException
public void setInputMTBImage(MTBImage img)
public MTBImage getInputMTBImage()
public void setInputImagePlus(ij.ImagePlus imp)
public ij.ImagePlus getInputImagePlus()
public void setFileName(String filename)
public String getFileName()
public void setCompression(String compression)
public String getCompression() throws de.unihalle.informatik.Alida.exceptions.ALDOperatorException
de.unihalle.informatik.Alida.exceptions.ALDOperatorException
public void setQuality(Integer quality) throws loci.formats.FormatException
quality
- quicktime movie quality ID (see Bio-Formats package loci.formats.out.QTWriter)
loci.formats.FormatException
public Integer getQuality()
public void setCodec(Integer codec) throws loci.formats.FormatException
codec
- the quicktime codec ID (see Bio-Formats package loci.formats.out.QTWriter)
loci.formats.FormatException
public Integer getCodec()
public void setFps(Integer fps) throws loci.formats.FormatException
fps
- frames per second of the written movie file (fps must be larger 0, otherwise validation fails)
loci.formats.FormatException
public Integer getFps()
public void setOverwrite(boolean overwrite)
public boolean getOverwrite()
public void setIgnoreInvalidStackSpecification(boolean ignore)
public boolean getIgnoreInvalidStackSpecification()
setIgnoreInvalidStackSpecification(.)
-method
for more explanation
public void addStatusListener(loci.common.StatusListener listener)
addStatusListener
in interface loci.common.StatusReporter
public void notifyListeners(loci.common.StatusEvent event)
notifyListeners
in interface loci.common.StatusReporter
public void removeStatusListener(loci.common.StatusListener listener)
removeStatusListener
in interface loci.common.StatusReporter
protected Object readResolve()
MTBOperator
This function is called on an instance of this class being deserialized from file, prior to handing the instance over to the user. It takes care of a proper initialization of transient member variables as they are not initialized to the default values during deserialization.
readResolve
in class MTBOperator
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |