Ticket #34 (closed enhancement: moved)
Opened 2007-03-19T11:01:11-05:00
Last modified 2014-01-09T13:12:55-06:00
Better ImageFlatField support within VisAD
Reported by: | curtis | Owned by: | curtis |
---|---|---|---|
Priority: | blocker | Milestone: |
|
Component: | visbio | Severity: | serious |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by curtis)
VisBio is using VisAD's ImageFlatField class, which was added to support FlatField objects backed with BufferedImage objects, for a couple of reasons:
- Java3D supports texturing by reference using a particular type of BufferedImage. Enabling this support within VisAD whenever possible would improve animation performance when using successive setData calls (which is what VisBio does).
- Bio-Formats can return BufferedImage objects with its IFormatReader.openImage(String, int) method. This API was chosen partially due to its compatibility with the texturing by reference scheme, but also because BufferedImage is a Java standard: it encapsulates all the requisite image details such as image width and height, bit depth, and underlying data array organization; and it can be easily painted to the screen.
One drawback to BufferedImage is that some types cannot be painted properly to the screen. For example, a BufferedImage containing floating point data must be normalized to [0, 1], or an exception is thrown during the paint operation. However, this drawback is easily avoided in the case of ImageFlatField, since it only hands off the BufferedImage directly if it meets certain prerequisites (i.e., if the BufferedImage is suitable for texturing by reference or otherwise appropriate for direct usage by the display engine).
In cases where the BufferedImage is not appropriate for direct usage, it must be converted to an image that is. In these cases, the number of color channels may change (typically from 1 to 3, since the texturing-by-reference-compatible BufferedImage is 3-byte RGB in structure). VisAD needs to be smart enough to know this change can occur, and deal with it internally.
Change History
comment:3 Changed 2014-01-09T13:12:55-06:00 by curtis
- Status changed from new to closed
- Resolution set to moved
- Description modified
- Severity set to serious