Horus Doc || Java GUI Reference || Doxygen's quick Index  

CorbaImageSpace3dViewer Class Reference

List of all members.

Public Methods

 CorbaImageSpace3dViewer ()
void addImage (HxCorba.ImageRep image, final String name)

Constructor & Destructor Documentation

CorbaImageSpace3dViewer::CorbaImageSpace3dViewer   [inline]
 

00027 {
00028     createContents();
00029 
00030     setPreferredSize(new Dimension(500,500));
00031 }


Member Function Documentation

void CorbaImageSpace3dViewer::addImage HxCorba.ImageRep    image,
final String    name
[inline]
 

00034 {
00035     double thubSize = 64.0; // must be a power of 2 !
00036 
00037     int w = image.dimensionSize(1);
00038     int h = image.dimensionSize(2);
00039 
00040     double sw = thubSize / (double)w;
00041     double sh = thubSize / (double)h;
00042 
00043     HxCorba.ImageRep thubImg = image.scale(sw,sh, HxCorba.GeoIntType.LINEAR);
00044     CanvasCorbaImage canvas = new CanvasCorbaImage(thubImg);
00045 
00046     Action ac = new AbstractAction() {
00047         public void actionPerformed(ActionEvent e) {
00048             OutputStreamArea.println(name);
00049         }
00050     };
00051 
00052     Random r = new Random();
00053     float x = r.nextFloat();
00054     float y = r.nextFloat();
00055     float z = r.nextFloat();
00056 
00057     _imagesPanel.addImage(canvas.getBuffer(), new Point3f(x, y, z), ac);
00058 }


The documentation for this class was generated from the following file:
Generated on Mon Jan 27 15:11:17 2003 for JavaReference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001