OSDN Git Service

[Backup]NyARToolkit for Java
[nyartoolkit-and/nyartoolkit-and.git] / src / jp / nyatla / utils / j2se / LabelingBufferdImage.java
index 15b7f76..7f2387a 100644 (file)
@@ -7,26 +7,25 @@
  *   HITLab, University of Washington, Seattle\r
  * http://www.hitl.washington.edu/artoolkit/\r
  *\r
- * The NyARToolkit is Java version ARToolkit class library.\r
- * Copyright (C)2008 R.Iizuka\r
+ * The NyARToolkit is Java edition ARToolKit class library.\r
+ * Copyright (C)2008-2009 Ryo Iizuka\r
  *\r
- * This program is free software; you can redistribute it and/or\r
- * modify it under the terms of the GNU General Public License\r
- * as published by the Free Software Foundation; either version 2\r
- * of the License, or (at your option) any later version.\r
+ * This program is free software: you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation, either version 3 of the License, or\r
+ * (at your option) any later version.\r
  * \r
  * This program is distributed in the hope that it will be useful,\r
  * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
  * GNU General Public License for more details.\r
- * \r
+ *\r
  * You should have received a copy of the GNU General Public License\r
- * along with this framework; if not, write to the Free Software\r
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.\r
  * \r
  * For further information please contact.\r
  *     http://nyatla.jp/nyatoolkit/\r
- *     <airmail(at)ebony.plala.or.jp>\r
+ *     <airmail(at)ebony.plala.or.jp> or <nyatla(at)nyatla.jp>\r
  * \r
  */\r
 package jp.nyatla.utils.j2se;\r
@@ -43,6 +42,8 @@ import jp.nyatla.nyartoolkit.core.rasterreader.*;
 import jp.nyatla.nyartoolkit.core.raster.*;\r
 import jp.nyatla.nyartoolkit.core.types.stack.*;\r
 import jp.nyatla.nyartoolkit.core.labeling.*;\r
+import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingImage;\r
+import jp.nyatla.nyartoolkit.core.labeling.artoolkit.NyARLabelingLabel;\r
 \r
 /**\r
  * bitmapとして利用可能なラベリングイメージです。\r
@@ -122,7 +123,7 @@ public class LabelingBufferdImage extends BufferedImage
 \r
        public void drawImage(NyARGrayscaleRaster i_raster) throws NyARException\r
        {\r
-               assert (i_raster.getBufferReader().getBufferType() == INyARBufferReader.BUFFERFORMAT_INT1D_GLAY_8);\r
+               assert (i_raster.getBufferReader().getBufferType() == INyARBufferReader.BUFFERFORMAT_INT1D_GRAY_8);\r
 \r
                int w = this.getWidth();\r
                int h = this.getHeight();\r
@@ -222,7 +223,7 @@ public class LabelingBufferdImage extends BufferedImage
        public void overlayData(NyARIntPointStack i_stack)\r
        {\r
                int count = i_stack.getLength();\r
-               NyARIntPoint2d[] items = (NyARIntPoint2d[])i_stack.getArray();\r
+               NyARIntPoint2d[] items = i_stack.getArray();\r
                Graphics g = this.getGraphics();\r
                for (int i = 0; i < count; i++) {\r
                        int x = items[i].x;\r
@@ -237,7 +238,7 @@ public class LabelingBufferdImage extends BufferedImage
        {\r
                Color[] c=new Color[]{Color.cyan,Color.red,Color.green};\r
                int count = i_stack.getLength();\r
-               NyARIntRect[] items = (NyARIntRect[])i_stack.getArray();\r
+               NyARIntRect[] items = i_stack.getArray();\r
                Graphics g = this.getGraphics();\r
                for (int i = 0; i < count; i++) {\r
                        int x = items[i].x;\r