/**
  * この関数は、ラスタの指定点を基点に、輪郭線を抽出します。 開始点は、輪郭の一部である必要があります。 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
  *
  * @param i_raster 輪郭線を抽出するラスタを指定します。
  * @param i_th 輪郭とみなす暗点の敷居値を指定します。
  * @param i_entry_x 輪郭抽出の開始点です。
  * @param i_entry_y 輪郭抽出の開始点です。
  * @param o_coord 輪郭点を格納する配列を指定します。i_array_sizeよりも大きなサイズの配列が必要です。
  * @return 輪郭の抽出に成功するとtrueを返します。輪郭抽出に十分なバッファが無いと、falseになります。
  * @throws NyARException
  */
 public boolean getContour(
     INyARGrayscaleRaster i_raster,
     int i_th,
     int i_entry_x,
     int i_entry_y,
     NyARIntCoordinates o_coord)
     throws NyARException {
   NyARIntSize s = i_raster.getSize();
   // ラスタドライバの切り替え
   if (i_raster != this._ref_last_input_raster) {
     this._imdriver = (IRasterDriver) i_raster.createInterface(IRasterDriver.class);
     this._ref_last_input_raster = i_raster;
   }
   return this._imdriver.getContour(0, 0, s.w - 1, s.h - 1, i_entry_x, i_entry_y, i_th, o_coord);
 }
 public static IRasterDriver createDriver(INyARGrayscaleRaster i_ref_raster)
     throws NyARException {
   switch (i_ref_raster.getBufferType()) {
     case NyARBufferType.INT1D_GRAY_8:
     case NyARBufferType.INT1D_BIN_8:
       return new NyARContourPickup_BIN_GS8(i_ref_raster);
     default:
       if (i_ref_raster instanceof NyARContourPickup_GsReader) {
         return new NyARContourPickup_GsReader((INyARGrayscaleRaster) i_ref_raster);
       }
       break;
   }
   throw new NyARException();
 }
 /**
  * この関数は、ラスタの指定点を基点に、画像の特定の範囲内から輪郭線を抽出します。 開始点は、輪郭の一部である必要があります。
  * 通常は、ラべリングの結果の上辺クリップとX軸エントリポイントを開始点として入力します。
  *
  * @param i_raster 輪郭線を抽出するラスタを指定します。
  * @param i_area 輪郭線の抽出範囲を指定する矩形。i_rasterのサイズ内である必要があります。
  * @param i_th 輪郭とみなす暗点の敷居値を指定します。
  * @param i_entry_x 輪郭抽出の開始点です。
  * @param i_entry_y 輪郭抽出の開始点です。
  * @param o_coord 輪郭点を格納するオブジェクトを指定します。
  * @return 輪郭線がo_coordの長さを超えた場合、falseを返します。
  * @throws NyARException
  */
 public boolean getContour(
     INyARGrayscaleRaster i_raster,
     NyARIntRect i_area,
     int i_th,
     int i_entry_x,
     int i_entry_y,
     NyARIntCoordinates o_coord)
     throws NyARException {
   // ラスタドライバの切り替え
   if (i_raster != this._ref_last_input_raster) {
     this._imdriver = (IRasterDriver) i_raster.createInterface(IRasterDriver.class);
     this._ref_last_input_raster = i_raster;
   }
   return this._imdriver.getContour(
       i_area.x,
       i_area.y,
       i_area.x + i_area.w - 1,
       i_area.h + i_area.y - 1,
       i_entry_x,
       i_entry_y,
       i_th,
       o_coord);
 }