Commit Graph
42 Commits
Author SHA1 Message Date
Zach Pincus 8f237dbefe ENH: Add tests for boundary-overlapping offsets 2012-06-07 09:02:31 -04:00
Zach Pincus 79972c3013 Indent 4 2012-06-07 08:55:35 -04:00
Zach Pincus ffff4a3077 BUG: MCP could segfault in places where both positive and negative moves would go out of bounds.
Previous assumption was that no location in the array would be one move from both upper and lower boundaries. This assumption is now removed.
2012-06-06 23:52:33 -04:00
zachrahan c9a14db5c4 Merge pull request #149 from zachrahan/tifffile-plugin
ENH: add tifffile plugin, tifffile tests, beef up freeimage tests
2012-02-21 16:18:34 -08:00
Zach Pincus 026fae0e97 BUG: Fix tests 2012-02-21 19:17:55 -05:00
Zach Pincus b80ef2a660 Fix copy/paste error 2012-02-21 18:17:34 -05:00
Zach Pincus e2d4261c6d ENH: Add tifffile tests and improve freeimage tests 2012-02-21 18:14:59 -05:00
Zach Pincus a6b154f5b5 Fix description of tifffile plugin 2012-02-21 17:55:32 -05:00
Zach Pincus 9512678e75 ENH: Add tifffile IO plugin 2012-02-21 17:53:16 -05:00
Zach PincusandStefan van der Walt f2321d0441 STY: Clarify logic of code for FreeImage loading. 2012-02-10 15:36:11 -08:00
Zach PincusandStefan van der Walt 6a31ea8508 BUG: Make it work actually... 2012-02-10 15:36:11 -08:00
Zach PincusandStefan van der Walt 99ac9e44ff ENH: load libfreeimage based on case-insensitive libname prefixes 2012-02-10 15:36:11 -08:00
Zach Pincus 12e67e781e ENH: Clarify FreeImage IO flags, improve tests, and fix documentation 2012-02-02 11:05:27 -05:00
Zach Pincus a4c986b02f DOC: Fix read_multipage docstring 2012-02-01 22:57:44 -05:00
Zach Pincus b5dce45446 ENH: Add metadata reading functions
Required small refactoring of file IO to provide a saner interface.
2012-02-01 22:48:01 -05:00
zachrahan 3a1641f799 Merge pull request #117 from zachrahan/freeimage-library_loader
ENH: Make FreeImage library-loading more robust and provide better errors
2012-02-01 10:43:44 -08:00
Zach Pincus 960ca18b71 Fix indentation error 2012-02-01 13:41:41 -05:00
Zach Pincus 273e8ffc04 Make library-loading more robust and provide better errors 2012-01-31 15:04:31 -05:00
Zach Pincus 981775d137 Clean up void-pointer handling to clarify intent and fix multipage 64-bit bugs 2012-01-22 18:34:28 -05:00
Zach Pincus fbb07734fc Tighten up _find_contours.pyx
Remove some redundant operations in _find_contours.pyx -- will speed
things especially in common case where most pixels DON'T have a contour
nearby.
2011-12-01 12:34:08 -05:00
zachrahan 60abf40c39 Merge pull request #1 from stefanv/find-contours
Convert contour finding code to Cython and add an example.
2011-12-01 09:11:52 -08:00
Zach Pincus 1cb10a5bd9 add _find_contours.c 2011-11-30 13:16:40 -05:00
Zach Pincus 077a080389 Move to measure submodule
Code moved to new "measure" submodule and another test and better
documentation added.
2011-11-27 17:05:27 -05:00
Zach Pincus 3e9945cf93 Make it work
bug fixes to make it install
2011-11-26 00:36:36 -05:00
Zach Pincus 51d643c527 Add contour-finding
Bring some old code for "marching-squares" contour-finding into
skimage. Only one crummy test and c code may not be up to style
standards...
2011-11-26 00:23:03 -05:00
Zach Pincus 9307bcb5bc fix _spath error 2011-11-08 15:19:12 -05:00
Zach Pincus 4cf55a2702 Fix another 64-bit corner case
Fix a bug for particularly huge images that have strides > 2**31 in any
dimension.
2011-11-07 17:06:59 -05:00
Zach Pincus ea63e7d709 use 64-bit safe types 2011-11-07 15:51:39 -05:00
Zach Pincus c2664f087e Fixed (?) segfaults on 64-bit platforms
This bug was caused by the fact that ctypes silently converts returned
c_void_p instances into python int values, even if the restype of a function
is c_void_p. Then, without explicit argtypes (which this module doesn't use,
out of laziness on my part), python ints passed to functions are treated as
32-bit ints.

Solution: explicitly wrap returned pointers as c_void_p, so that they'll get
treated right when passed back to C. No more segfaults!

I also reverted the _wrap_bitmap_bits_in_array code to what I wrote, as I
can vouch for that on 64-bit, whereas the other version had a "still crashes"
note...
2011-05-09 11:52:35 -04:00
Zach PincusandZach Pincus 340d92c711 Fix memory leak due to not properly using __cinit__ in heap classes 2011-05-09 10:04:32 -04:00
Zachary Pincus 61084612e7 add tests 2011-01-07 08:58:05 -05:00
Zachary Pincus 0994d80d4e allow negative-cost elements 2011-01-07 08:08:54 -05:00
Zachary Pincus 171bd18f80 fix infinite-handling in mcp and precision issues in heap 2011-01-07 08:01:21 -05:00
Zachary PincusandStefan van der Walt 325b59c59a palette support for saving 8-bit greyscale images 2010-10-22 23:33:23 +02:00
Zachary Pincus 4a0e4e2285 Oops: actually fix heap performance problem... 2010-04-08 18:13:45 -04:00
Zachary Pincus 56a5cadde2 Performance fix for heap; correctness for _mcp
(1) normalize_indices in _mcp.pyx should convert indices to ints: fixed
(2) huge (order of magnitude) performance problems in heap.pyx from changing
lines like:
ii = (i-1)/2 # CalcPrevAbs

to:
ii = (int)(i-1)/2 # CalcPrevAbs

for some reason,  the latter goes through the python division machinery!
However, the former is invalid for cython >=0.12, so the proper solution is:
ii = (i-1)//2 # CalcPrevAbs
2010-04-08 18:11:47 -04:00
Zachary Pincus 07fbf605b2 Fix heap.pyx to work when infinite values are pushed. 2009-12-30 14:31:08 -05:00
Zachary Pincus ad141b680d Finish commits of changes to graph: __init__ and setup and remove old cruft. 2009-12-29 13:31:55 -05:00
Zachary Pincus 8b2a8b5031 Rewrite spath.shortest_path to use new mcp classes
spath.shortest_path presents the same interface, but now uses the new mcp
classes internally, which means that it is now fully n-d, and can also find
the shortest path along any given axis. The old output format has been
retained, but is a bit weird for non-2d arrays. A more sensible n-d output
format is available, but not enabled by default.
2009-12-29 13:17:18 -05:00
Zachary Pincus 6f39426485 Added classes for minimum-cost-pathfinding through n-d arrays.
mcp.py presents the interface and a simple usage example; the classes of
interest are in _mcp.pyx. Basic tests are included.
2009-12-29 13:05:53 -05:00
Zachary Pincus 4741c113ca Add fast binary heap classes (from Almar Klein)
cython classes for fast binary heaps (that store (value, reference) pairs) are
now available from scikits.image.graph.heap
2009-12-29 13:04:22 -05:00
Zachary Pincus 17edd0cc29 Modify _build.py:cython() to be cleaner:
(1) Now uses subprocess.call instead of os.system, so that paths with spaces
    (and the like) are handled properly.

(2) Removes superfluous .c.new files after deciding whether or not to copy
    them to the .c files.
2009-12-29 12:38:31 -05:00