Almar Klein
32c4a80b32
update-mcp: Add MCP_Flexible subclass.
...
This class adds a public def-method for the private cdef-method hooks.
This allows users to influence the behavior of the MCP algorithm by
subclassing it in pure Python.
2013-12-13 15:13:24 +01:00
Almar Klein
8fe7416d41
update-mcp: Add MCP_Connect class
...
This class finds the connections between the given seed points. This is
a bit similar to finding connections between start and end points, except
now start- and endpoints are the same.
2013-12-13 15:13:24 +01:00
Almar Klein
798bea7251
update-mcp: Refactor MCP algorithm in prep for MCP subclasses
...
Installed a few hooks to allow more flexibility in subclasses, refactored
traceback() to allow obtaining tracebacks fast during front evolution, and
moved some initializations to reset().
Full list:
* integer division in calculating indices
* traceback_offsets use -2 for uninitialized, -1 for seed point. In that
we we can distinguish between these two cases in traceback()
* Clearing of traceback_offset, cumulative_costs, pushing start positions
into the heap, are now all done in reset()
* Reset is called every time that find_cost is called.
* Add hook _goal_reached()
* Add hook _examine_neighbor()
* Add hook _update_node()
* Replace while loop with a for-loop to prevent infinite looping in case of a bug.
* Split traceback() in two functions to allow getting a flat traceback fast.
traceback() calles these two private functions and behaves as just before.
2013-12-13 15:13:24 +01:00
Almar Klein
280fadff39
MCP: refactored to use typed memoryviews
...
The arrays are stored on the mcp object, so that they can
be used in methods as well. Will use that to make MCP more
flexibel.
2013-12-13 15:13:24 +01:00
Almar Klein
d1329488e6
MCP: add sampling attribute: deal with anisotropic data.
2013-12-13 15:13:24 +01:00
Almar Klein
f5c675b8c6
MCP: turn while loop into for loop to prevent infinite looping.
...
A nice feature during development :)
2013-12-13 15:13:24 +01:00
Almar Klein
8d09300155
Improve speed of MPC by about 30%
...
Dear diary, I spend a whole day searching for why this implementation
of the MPC was slower then my own implementation. I checked *everything*.
I rewrote the front evolution to match with mine almost exactly. I was
about to give up. And then I saw this... Arg!
2013-12-13 15:13:24 +01:00
Almar Klein
4b2136bc7d
Make mcp evolution algorithm a bit more readable.
...
In particular, distinguish between cost and cumcost, the same
variable name was used for this.
2013-12-13 15:13:24 +01:00
Stefan van der Walt
0d5b822110
Merge pull request #848 from ahojnnes/warps
...
Speed up warps by inlining interpolation functions
2013-12-08 19:03:16 -08:00
Johannes Schönberger
688778b572
Move inlined function definitions to header for actual inlining
2013-12-09 00:57:07 +01:00
Stefan van der Walt
cff007827c
Merge pull request #825 from ahojnnes/coverage
...
MRG: Increase test coverage
2013-12-03 00:29:15 -08:00
Raphael Ackermann
0c81e14bfa
changing docstring to make clear that only 2-D images are currently supported
2013-12-01 23:11:33 +01:00
Johannes Schönberger
86c90a336f
Merge pull request #821 from JDWarner/add_conditional_doctest_decorator
...
ENH: Add `doctest_skip_parser` allowing conditional skipping of doctests
2013-11-25 13:54:29 -08:00
Johannes Schönberger
4d6308c810
Fix error in line model test
2013-11-22 13:28:53 +01:00
Johannes Schönberger
43f6ae9a2c
Add test case for explicit use of radii and sigmas parameters
2013-11-22 12:46:41 +01:00
Johannes Schönberger
5b3c21a4d4
Add test for neggative gamma parameter
2013-11-22 12:33:21 +01:00
Johannes Schönberger
0a2ed35253
Add test for negative input image
2013-11-22 12:30:49 +01:00
Johannes Schönberger
e904454c2e
Add test for mask output of corner_peaks
2013-11-22 12:26:41 +01:00
Johannes Schönberger
335a74e11f
Add test case for eps corner_harris method
2013-11-22 12:25:06 +01:00
Johannes Schönberger
4033566ae6
Add test for invalid parameter combination
2013-11-22 12:22:10 +01:00
Johannes Schönberger
6e6505ecb6
Increase test coverage of regionprops
2013-11-22 12:16:44 +01:00
Johannes Schönberger
2e8a36a283
Rename test to enable hidden line model test
2013-11-22 12:11:47 +01:00
Johannes Schönberger
c53e98a3c6
Fix bug in inverse warping and add test case
2013-11-22 12:07:36 +01:00
Johannes Schönberger
396b686bab
Add test case for invalid image dimensions
2013-11-22 11:59:07 +01:00
Johannes Schönberger
d659cdc6b0
Deprecate reverse_map parameter and add to future removal list
2013-11-22 11:55:18 +01:00
Johannes Schönberger
da42c46ab4
Add matrix_transform function to namespace
2013-11-22 11:51:15 +01:00
Johannes Schönberger
e159fa0e9d
Add test case for estimate_transform
2013-11-22 11:48:32 +01:00
Johannes Schönberger
62f51e35a1
Add missing test coverage of polynomial tform
2013-11-22 11:45:51 +01:00
Johannes Schönberger
bd240d9f92
Test scale determination for 0 rotation
2013-11-22 11:43:08 +01:00
Johannes Schönberger
4ba9eaa98b
Test invalid input
2013-11-22 11:42:41 +01:00
Johannes Schönberger
0fb48a6153
Add test cases for abstract geometric base class
2013-11-22 11:38:25 +01:00
Johannes Schönberger
06a9c5da8a
Add test case for union of heterogenous tform types
2013-11-22 11:34:32 +01:00
Jostein Bø Fløystad
ccbd3bfced
unwrap: Do not include debug symbols in extension builds.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
37b5a946c8
unwrap tests: PEP8 fixes.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
8ad3d1df17
unwrap: Simplify code after completing float->double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
593a7d63ce
unwrap: Change 1D unwrapper from float to double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
cd5cc84aa9
unwrap: Change 3D wrapper code from float to double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
d0ccbe71c1
unwrap: Change 3D C code from float to double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
9091d2759a
unwrap: Change 2D wrapper code from float to double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
9bacb0d54a
unwrap: Use UNIX line endings.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
ebf457cea8
unwrap: Convert 2D C code from float to double.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
a6e7bd4a00
unwrap: Use constants from math.h in C code.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
f53a4e0764
unwrap: Add naive 1D unwrapper.
...
The naive 1D unwrapper does not support masked arrays because the
1D unwrapping problem has an infite number of solutions when faced with
missing data. Wrap around is not implemented because 1D phase unwrapping
must start at a certain pixel, and there will always be a risk of a
discontinuity there, wrap around or not.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
f87fadf0f0
unwrap: Rename C files.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
b2ac1a5872
unwrap: Add docstring example.
2013-11-22 10:45:07 +01:00
Jostein Bø Fløystad
27c13a1193
unwrap: Warn about singleton dimensions in 3D arrays.
2013-11-22 10:45:06 +01:00
Jostein Bø Fløystad
781ead2c9f
unwrap: Rename function unwrap() -> unwrap_phase().
2013-11-22 10:45:06 +01:00
Jostein Bø Fløystad
4cfec880b6
unwrap: Small style-like fixes.
...
Based on comments by ahojnnes.
2013-11-22 10:45:06 +01:00
Jostein Bø Fløystad
e0b7fe32a1
unwrap: PEP8 fixes.
2013-11-22 10:45:06 +01:00
Jostein Bø Fløystad
9e50686c8f
unwrap: Add test for unwrapping masked images.
2013-11-22 10:45:06 +01:00