|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.Alida.operator.ALDPortHashAccess
de.unihalle.informatik.MiToBo.core.operator.MTBPortHashAccess
@ALDMetaInfo(export=ALLOWED) public class MTBPortHashAccess
Interface to the port database of the Alida / MiToBo operator history.
This class implements an interface to access the history database. It yields the only possibility to access the database, direct access is blocked to guarantee database consistency.
Compared to the superclass a special treatment of MiToBo images takes place to ensure proper association of MiToBo images and underlying ImageJ ImagePlus data. Objects are usually registered by their references in the port database, however, in case of MiToBo images and underlying ImagePlus data different object references, i.e. the MTBImage and the ImagePlus, essentially represent the same data in the system. Hence, for history database validity explicit associations need to be established between ImagePlus and MTBImage data.
Database consistency is ensured by introducing a specialized data type
which is the MTBHistoryImageBox
. If a MTBImage is fed into an
operator as parameter the first time, a corresponding image box is created
and registered in the local hash.
Lateron, when the ImagePlus object linked to the MTBImage is directly
used as parameter, the MiToBo images within all boxes are searched to find
the corresponding MTBImage. Then the history port associated with the
box is updated, ensuring history consistency and at the same time
proper association of the ImagePlus with the formerly known MTBImage.
In case of using an ImagePlus as parameter that has not been seen before, the same mechanism is applied. First an image box is initialized for the new ImagePlus. When at a later point in time the MTBImage is used as parameter which is associated to the formerly seen ImagePlus, the association is explicitly established by linking the MTBImage to the box and updating the history port of the box accordingly.
Field Summary | |
---|---|
static String |
MPH_EXTENSION
Default extension of MiToBo processing history file. |
Fields inherited from class de.unihalle.informatik.Alida.operator.ALDPortHashAccess |
---|
ALD_EXTENSION |
Constructor Summary | |
---|---|
protected |
MTBPortHashAccess()
Constructor without function. |
Method Summary | |
---|---|
protected de.unihalle.informatik.Alida.operator.ALDPort |
getHistoryLink(Object obj)
Gets the port to which the object is currently linked in history. |
protected boolean |
isRegistered(Object obj)
Checks if an object is registered in the database. |
protected void |
register(Object obj)
Registers the object to the database. |
protected void |
setHistoryLink(Object obj,
de.unihalle.informatik.Alida.operator.ALDPort port)
Sets the port to which the object is to be linked in history. |
Methods inherited from class de.unihalle.informatik.Alida.operator.ALDPortHashAccess |
---|
getNumEntries, readHistory, writeHistory, writeHistory, writeHistory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String MPH_EXTENSION
Constructor Detail |
---|
protected MTBPortHashAccess()
Note that there will be only one processing history per session and not many different objects of this type.
Method Detail |
---|
protected boolean isRegistered(Object obj)
isRegistered
in class de.unihalle.informatik.Alida.operator.ALDPortHashAccess
obj
- Object to check.
protected void register(Object obj)
register
in class de.unihalle.informatik.Alida.operator.ALDPortHashAccess
obj
- Object to register.protected de.unihalle.informatik.Alida.operator.ALDPort getHistoryLink(Object obj)
getHistoryLink
in class de.unihalle.informatik.Alida.operator.ALDPortHashAccess
protected void setHistoryLink(Object obj, de.unihalle.informatik.Alida.operator.ALDPort port)
setHistoryLink
in class de.unihalle.informatik.Alida.operator.ALDPortHashAccess
port
- New port the data object is to be linked to.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |