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).

1  
svoid test_RegionBorder_innerPoints_thinSpike() {
2  
  //set flag RegionBorder_innerPoints_debug.
3  
  //set flag FastRegions_debug.
4  
  BWImage img = bwImageFromString([[
5  
    ______
6  
    _xxxx_
7  
    _xx___
8  
    ______
9  
  ]]);
10  
  FastRegions_BWImage regions = new(img);
11  
  regions.run();
12  
  assertEqualsVerbose(2, regions.nRegions());
13  
  RegionBorder_innerPoints border = new(regions, 2);
14  
  var points = border.allPoints();
15  
  //removeLastIfSameAsFirst(points);
16  
  assertEqualsVerbose(litpts(1, 1, 2, 1, 3, 1, 4, 1, 3, 1, 2, 1, 2, 2, 1, 2), points);
17  
  assertEqualsVerbose("44488682", str(border.onePath()));
18  
}

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: 180 / 283
Version history: 11 change(s)
Referenced in: [show references]