webknossos-libs icon indicating copy to clipboard operation
webknossos-libs copied to clipboard

Allow xyz in tile cubing

Open thopp-tudelft opened this issue 3 years ago • 0 comments

Description:

rewrites the detect_interval_for_dimensions function to use a regex and os.walk instead of glob and str.index, making it much more robust and improving performance by cutting a lot of nested loops

(small but measurable speed increase in my test of ~10 000 files: from 0.4s to 0.07)

giving a path with an x, y or z in it, anywhere in the input path or --input_path_pattern before the templated character between {} would fail as it'd try to grab that character as if it were a coordinate because it used str.index

the minimum amount of padding is now required to be consistent, it will raise a RuntimeError when it'll encounter a file with for example image_001.jpg as a name next to an image named image_2.jpg, however image_1003.jpg will still be accepted

adds a new test for this

fixes the annoying deprecation warnings

Issues:

  • not reported so far...

Todos:

Make sure to delete unnecessary points or to check all before merging:

  • [ ] Updated Changelog
  • [ ] Updated Documentation
  • [x] Added / Updated Tests
  • [ ] Considered adding this to the Examples

thopp-tudelft avatar Dec 08 '22 18:12 thopp-tudelft