Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1034904 // test_RegionBorder_innerPoints_v2_thinSpike (OK)

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (11775L/68K).

svoid test_RegionBorder_innerPoints_v2_thinSpike() {
  BWImage img = bwImageFromString([[
    ______
    _xxxx_
    _xx___
    ______
  ]]);
  FastRegions_BWImage regions = new(img);
  regions.run();
  assertEqualsVerbose(2, regions.nRegions());
  RegionBorder_innerPoints_v2 border = new(regions.getRegion(2));
  var points = border.allPoints();
  //removeLastIfSameAsFirst(points);
  assertEqualsVerbose(litpts(1, 1, 2, 1, 3, 1, 4, 1, 3, 1, 2, 1, 2, 2, 1, 2), points);
  assertEqualsVerbose("44488682", str(border.onePath()));
}

Author comment

Began life as a copy of #1034099

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034904
Snippet name: test_RegionBorder_innerPoints_v2_thinSpike (OK)
Eternal ID of this version: #1034904/3
Text MD5: badae16292e0736f7bd1449666bd4b73
Transpilation MD5: 6b647d6f99169681719e2f676ad1b518
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-14 17:15:29
Source code size: 545 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 160 / 213
Version history: 2 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1034949 - test_RegionBorder_innerPoints_v2_onePathWithOrigin (OK)
#1034977 - test_RegionBorder_innerPoints_withDiagonals_thinSpike (OK)