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

18
LINES

< > BotCompany Repo | #1034099 // test_RegionBorder_innerPoints_thinSpike (OK)

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

Libraryless. Click here for Pure Java version (10529L/60K).

svoid test_RegionBorder_innerPoints_thinSpike() {
  //set flag RegionBorder_innerPoints_debug.
  //set flag FastRegions_debug.
  BWImage img = bwImageFromString([[
    ______
    _xxxx_
    _xx___
    ______
  ]]);
  FastRegions_BWImage regions = new(img);
  regions.run();
  assertEqualsVerbose(2, regions.nRegions());
  RegionBorder_innerPoints border = new(regions, 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 #1033944

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1034099
Snippet name: test_RegionBorder_innerPoints_thinSpike (OK)
Eternal ID of this version: #1034099/12
Text MD5: b96ef892fbb92fe60dcffebfcbdc9552
Transpilation MD5: b98219343278fee12055f503f87fea9d
Author: stefan
Category: javax / imaging
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-01-22 15:47:36
Source code size: 608 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 178 / 281
Version history: 11 change(s)
Referenced in: [show references]