Inheritance diagram for JavaImageData::
Public Methods | |
JavaImageData (Image im) | |
boolean | isValid () |
JavaImageData (String name) | |
JavaImageData (int width, int height) | |
int | dimensionality () |
int | numberOfPixels () |
int | pixelDimensionality () |
int | pixelPrecision () |
HxCorba.PixelT | pixelType () |
HxCorba.Sizes | getSizes () |
int | dimensionSize (int i) |
HxCorba.ImageSignature | signature () |
int[] | getRgb2d (String displayMode) |
void | fillRgb2d (HxCorba.RgbBuffer buf, String displayMode) |
HxCorba.ImageRepRgbSource | getRgbSource () |
This is not a real Servant since it does not inherit from org.omg.PortableServer. However, a Servant is easily created by instantiating an HxCorba.ImageDataPOATie with a JavaImageData object.
|
00030 { 00031 Component component = new Component() {}; 00032 MediaTracker tracker = new MediaTracker(component); 00033 00034 //Wait for image 00035 00036 synchronized(tracker) { 00037 tracker.addImage(im, 0); 00038 try { 00039 tracker.waitForAll(); 00040 } catch (InterruptedException e) { 00041 System.out.println("INTERRUPTED while loading Image"); 00042 } 00043 //loadStatus = tracker.statusID(0, false); 00044 tracker.removeImage(im, 0); 00045 } 00046 00047 _image = im; 00048 _width = im.getWidth(null); 00049 _height = im.getHeight(null); 00050 00051 _dimensionality = 2; 00052 _pixDim = 3; 00053 _pixPrec = 8; 00054 _pixType = HxCorba.PixelT.INT_VALUE; 00055 _signature = HxCorba.ImageSignature.SIG2DVEC3SHORT; 00056 } |
|
00064 { 00065 this(Toolkit.getDefaultToolkit().getImage(name)); 00066 } |
|
00069 { 00070 this(new BufferedImage(width, height, BufferedImage.TYPE_INT_ARGB)); 00071 } |
|
00059 { 00060 return ((_width != -1) && (_height != -1)); 00061 } |
|
Reimplemented from ImageDataOperations.
00074 { 00075 return _dimensionality; 00076 } |
|
Reimplemented from ImageDataOperations.
00079 { 00080 return _width * _height; 00081 } |
|
Reimplemented from ImageDataOperations.
00084 { 00085 return _pixDim; 00086 } |
|
Reimplemented from ImageDataOperations.
00089 { 00090 return _pixPrec; 00091 } |
|
Reimplemented from ImageDataOperations.
00095 { 00096 return _pixType; 00097 } |
|
Reimplemented from ImageDataOperations.
00100 { 00101 return new HxCorba.Sizes(_width, _height, 1); 00102 } |
|
00105 { 00106 if(i==1) return _width; 00107 if(i==2) return _height; 00108 00109 return 1; 00110 } |
|
Reimplemented from ImageDataOperations.
00113 { 00114 return _signature; 00115 } |
|
00118 { 00119 int[] pixels = new int[_width * _height]; 00120 PixelGrabber pg = new PixelGrabber(_image, 0, 0, _width, _height, pixels, 0, _width); 00121 00122 try { 00123 pg.grabPixels(); 00124 } catch (InterruptedException e) { 00125 //return null; 00126 } 00127 00128 //if((pg.getStatus() & java.awt.image.ImageObserver.ABORT) != 0) { 00129 // return null; 00130 //} 00131 00132 return pixels; 00133 } |
|
00136 { 00137 buf.setRgb(getRgb2d(displayMode)); 00138 } |
|
Reimplemented from ImageDataOperations.
00141 { 00142 return null; 00143 } |