|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unihalle.informatik.MiToBo.core.operator.MTBPortHashAccess.MTBHistoryImageBox
private static class MTBPortHashAccess.MTBHistoryImageBox
Database object boxing ImagePlus and MTBImage.
In MiToBo the data type MTBImage
most of the time acts like
a wrapper for an underlying ImagePlus object. In addition, an object of
type ImagePlus is required anyway to display the MTBImage to the user.
Currently all changes done to either the MTBImage or the corresponding
ImagePlus object trigger changes in the associated object as well.
The MiToBo history tracks operations performed on an object during its lifetime assuming a unique identifier for each object. In case of MTBImage this is not true anymore as the image can be accessed either as MTBImage or as ImagePlus. These are physically two different objects, however, should logically be treated the same. Consequently, the history database needs to explicitly link both objects to each other and treat them internally as one single object.
This class implements a container for a pair of associated images of type MTBImage and ImagePlus. Whenever the database is queried for an object of either of both types, the query is redirected to the associated container object. Each container object owns a unique dataport and a history, if available, i.e. may be treated as any other object in the database.
Field Summary | |
---|---|
private java.lang.ref.WeakReference<ij.ImagePlus> |
imgPlusRef
ImagePlus object in container. |
private java.lang.ref.WeakReference<MTBImage> |
mtbImageRef
MTBImage object in container. |
Constructor Summary | |
---|---|
protected |
MTBPortHashAccess.MTBHistoryImageBox(ij.ImagePlus i)
Default constructor for an ImagePlus without linked MTBImage. |
protected |
MTBPortHashAccess.MTBHistoryImageBox(MTBImage m)
Default constructor for an MTBImage without associated ImagePlus. |
protected |
MTBPortHashAccess.MTBHistoryImageBox(MTBImage m,
ij.ImagePlus i)
Default constructor for an image pair. |
Method Summary | |
---|---|
protected boolean |
containsImagePlus()
Checks if the box contains an ImagePlus. |
protected boolean |
containsMTBImage()
Checks if the box contains a MTBImage. |
protected ij.ImagePlus |
getImagePlus()
Gets the stored ImagePlus. |
protected MTBImage |
getMTBImage()
Gets the stored MTBImage. |
protected void |
setImagePlus(ij.ImagePlus imp)
Stores given image to the container. |
protected void |
setMTBImage(MTBImage mimg)
Stores given image to the container. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private java.lang.ref.WeakReference<ij.ImagePlus> imgPlusRef
private java.lang.ref.WeakReference<MTBImage> mtbImageRef
Constructor Detail |
---|
protected MTBPortHashAccess.MTBHistoryImageBox(ij.ImagePlus i)
m
- MTBImage object.protected MTBPortHashAccess.MTBHistoryImageBox(MTBImage m)
m
- MTBImage object.protected MTBPortHashAccess.MTBHistoryImageBox(MTBImage m, ij.ImagePlus i)
m
- MTBImage object of the pair.i
- ImagePlus object of the pair.Method Detail |
---|
protected boolean containsImagePlus()
protected boolean containsMTBImage()
protected ij.ImagePlus getImagePlus()
null
.protected MTBImage getMTBImage()
null
.protected void setImagePlus(ij.ImagePlus imp)
mimg
- ImagePlus to be stored in container.protected void setMTBImage(MTBImage mimg)
mimg
- MTBImage to be stored in container.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |