Ticket #34 (closed enhancement: moved)

Opened 13 years ago

Last modified 6 years ago

Better ImageFlatField support within VisAD

Reported by: curtis Owned by: curtis
Priority: blocker Milestone: visbio4.0
Component: visbio Severity: serious
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by curtis) (diff)

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:1 Changed 13 years ago by curtis

  • Description modified (diff)

comment:2 Changed 13 years ago by curtis

  • Milestone set to visbio4.0

comment:3 Changed 6 years ago by curtis

  • Status changed from new to closed
  • Resolution set to moved
  • Description modified (diff)
  • Severity set to serious
Note: See TracTickets for help on using tickets.