| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||
java.lang.Object | +--ncsa.horizon.util.ImageDisplayMap
This object can be used by a Viewer to keep track of how data pixels are begin mapped to display pixels. This can be non-trivial when users have requested a subregion of the data to display. Another tricky effect is data order. For instance, computer graphics images (like GIF and JPEG) order the data such that the first pixel should appear in the top left corner; however, some scientific data (such as FITS) orders the data using the mathematical convention where the first pixel should appear in the lower left corner. Both these effects can be kept track of with this object.
| Field Summary | |
| Slice | data
the 2-d portion of data being displayed |
| java.awt.Rectangle | display
the 2-d region that the data is displayed to |
| boolean | xaxisReversed
true if data pixel positions increase to the left and xpos should be taken to be relative to the right side of the display region (i.e. the right side of the right-most display pixel in the xaxis). |
| boolean | yaxisReversed
true if data pixel positions increase upwards and ypos should be taken to be relative to the right side of the display region (i.e. the bottom side of the bottom-most display pixel in the yaxis). |
| Constructor Summary | |
| ImageDisplayMap(Slice dataSlice,
java.awt.Rectangle displayRegion)
create an ImageDisplayMap object assuming that the given slice will be displayed in a given Rectangle |
|
| ImageDisplayMap(Slice dataSlice,
java.awt.Rectangle displayRegion,
boolean xIsReversed,
boolean yIsReversed)
create an ImageDisplayMap object assuming that the given slice will be displayed in a given Rectangle |
|
| ImageDisplayMap(Slice dataSlice)
create an ImageDisplayMap object assuming that the given slice will be displayed in a 1 x 1 pixel region. |
|
| ImageDisplayMap()
create an ImageDisplayMap object assuming that a slice made up of the will first data voxel in a volume of data will be displayed in a 1 x 1 pixel region. |
|
| Method Summary | |
| java.lang.Object | clone()
|
| Slice | getDataSlice(java.awt.Rectangle displayRegion)
return the Slice enclosed by a rectanglar region of the display |
| Voxel | getDataVoxel(java.awt.Point displayPixel)
return a data point location associated with a given display pixel given display pixel. |
| java.awt.Rectangle | getDisplay()
return a copy of the Rectangle being used as the current the display region |
| java.awt.Point | getDisplayPixel(Voxel dataVoxel)
return a Point that represents the display pixel that coves a given data location. |
| java.awt.Rectangle | getDisplayRegion(Volume dataVol)
return the Rectangle that encloses the intersection of a given slice with the data currently being displayed. |
| Slice | getSlice()
return a copy of the Slice being mapped to the display region |
| double | getXDataPos(Voxel dataVoxel)
return the position of a Voxel along the axis currently being displayed in horizontal direction. |
| double | getYDataPos(Voxel dataVoxel)
return the position of a Voxel along the axis currently being displayed in vertical direction. |
| void | setDisplay(java.awt.Rectangle newDisplay)
change the Slice being mapped to the current display region |
| void | setSlice(Slice newSlice)
change the Slice being mapped to the current display region |
| Methods inherited from class java.lang.Object | |
| clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait | |
| Field Detail |
protected Slice data
protected java.awt.Rectangle display
public boolean xaxisReversed
public boolean yaxisReversed
| Constructor Detail |
public ImageDisplayMap(Slice dataSlice,
java.awt.Rectangle displayRegion)
public ImageDisplayMap(Slice dataSlice,
java.awt.Rectangle displayRegion,
boolean xIsReversed,
boolean yIsReversed)
public ImageDisplayMap(Slice dataSlice)
public ImageDisplayMap()
| Method Detail |
public Voxel getDataVoxel(java.awt.Point displayPixel)
displayPixel
- a position in the display regionpublic double getXDataPos(Voxel dataVoxel)
public double getYDataPos(Voxel dataVoxel)
public java.awt.Point getDisplayPixel(Voxel dataVoxel)
public Slice getDataSlice(java.awt.Rectangle displayRegion)
public java.awt.Rectangle getDisplayRegion(Volume dataVol)
public void setSlice(Slice newSlice)
public Slice getSlice()
public void setDisplay(java.awt.Rectangle newDisplay)
public java.awt.Rectangle getDisplay()
public java.lang.Object clone()
| Overview | Package | Class | Tree | Deprecated | Index | Help | |||
| PREV CLASS | NEXT CLASS | FRAMES | NO FRAMES | ||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||