Commit Graph

127 Commits

Author SHA1 Message Date
Johannes Schönberger 69eafa95df Add __all__ to segmentation package 2013-04-28 23:20:00 +02:00
Stefan van der Walt 81479ca591 BUG: Fix integer type in Felzenwalb cython. 2013-04-22 17:27:01 +02:00
Josh Warner (Mac) e3c3a69560 add assertion checks to ensure data shape is unchanged 2013-04-14 20:16:18 -05:00
Josh Warner (Mac) 8e0eb4a2b1 fix: remove unnecessary forced copy 2013-04-14 20:15:19 -05:00
Josh Warner (Mac) 28c7d8afd3 Use force_copy argument of img_as_float
Also three PEP8 fixes
2013-04-12 10:02:33 -05:00
Josh Warner (Mac) f1ef7d5da2 PEP8 fixes; remove unneeded pyamg import; add data shape check 2013-04-11 14:02:10 -05:00
Josh Warner (Mac) 1edbf3e6f4 fix to preserve input image shape upon executing random_walker 2013-04-11 11:49:10 -05:00
Christoph Gohlke dda83fdb55 Fix ValueError: Buffer dtype mismatch on win-amd64 2013-03-04 17:30:40 -08:00
Tony S Yu 17e7ba3de7 DOC: Fix Sphinx errors. 2013-03-02 17:22:10 -06:00
Johannes Schönberger 62d83ad42c Globally change np to cnp if cimported 2013-02-24 14:14:14 +01:00
Johannes Schönberger 7e578b5dec Fix index type error in SLIC function 2013-02-22 17:05:39 +01:00
Johannes Schönberger 983cb76319 Remove print statement 2013-02-22 17:05:39 +01:00
Johannes Schönberger 614023b941 Replace ssize_t with Py_ssize_t globally 2013-02-22 17:05:38 +01:00
Johannes Schönberger 9f55fa2112 Change type to ssize_t for all index and size variables 2013-02-22 17:05:10 +01:00
Johannes Schönberger c9f72e93d6 Change type to ssize_t for all index and size variables 2013-02-22 17:05:10 +01:00
Stefan van der Walt 18aef47100 Merge pull request #395 from jni/jni-slic-bw
ENH: Allow grayscale input images to SLIC segmentation.
2012-12-22 11:42:19 -08:00
Tony S Yu 7c0424fd83 Merge pull request #378 from sergeyk/master
Fixed RGB<->XYZ conversion (was incorrect before).
2012-12-18 07:57:06 -08:00
Tony S Yu 08da07b1cd Merge pull request #377 from jni/jni-segmentation-join
Add functions to join and relabel segmentations
2012-12-17 06:44:47 -08:00
Juan Nunez-Iglesias 35e8ad2ccc Allow grayscale input images to SLIC segmentation
There is no reason for SLIC to be restricted to colour/RGB images. I
have added a few lines that allow single-channel input.
2012-12-17 16:45:23 +11:00
Juan Nunez-Iglesias 2ebac38c4d Rename ar to label_field for clarity 2012-12-17 16:37:41 +11:00
Juan Nunez-Iglesias e3951a2a78 Rename ar_relabeled to relabeled for simplicity 2012-12-12 14:31:05 +11:00
Johannes Schönberger 33c58ad854 Fix some doc string formatting issues of random walker 2012-12-09 23:19:42 +01:00
Johannes Schönberger a410f1c47e UmfPack warning is now only raised if random walker is explicitly called 2012-12-09 23:17:06 +01:00
Tony S Yu bf28a38f6e ENH: Make black the default boundary color for mark_boundaries.
This improves visibility in light-colored image regions. Note also that the new behavior matches the behavior from the 0.7 release.
2012-12-02 16:02:27 -05:00
Andreas Mueller b5d1e9f209 FIX quickshift nosetest with different xyz color conversion 2012-11-30 15:36:01 +01:00
Juan Nunez-Iglesias b906082034 Add testing functions for join and relabel 2012-11-28 12:48:13 +11:00
Juan Nunez-Iglesias dc377970f5 Add functions to join and relabel segmentations
The join of two segmentations is the segmentation in which two voxels
are in the same segment if and only if they are in the same segment in
both input segmentations.
2012-11-28 12:22:14 +11:00
Paul Ivanov b4b090271d complete singularization of scikit-image
I've updated references in the code and documentation to the new name.
2012-10-08 16:29:55 -07:00
Tony S Yu ad53159d60 STY: Rename highlight_boundaries to mark_boundaries 2012-10-07 19:23:38 -04:00
Tony S Yu 694ac11f93 STY: Rename visualize_boundaries to highlight_boundaries
Add @deprecated decorator to ease the transition.
2012-10-07 15:43:28 -04:00
Tony S Yu 500b1c507c ENH: Add grayscale support and color adjustment to visualize_boundaries 2012-10-07 15:33:03 -04:00
cgohlke e9790800d3 Fix ValueError: Buffer dtype mismatch on 64 bit platforms 2012-09-29 15:36:55 -07:00
Andreas Mueller 6c59e04714 MISC remove unused imports, some pep8 corrections. 2012-09-27 20:01:45 +01:00
Stefan van der Walt 03a701c831 Merge pull request #323 from emmanuelle/bug_rw
BUG: Correct a newly appeared bug in the random walker.
2012-09-19 17:53:25 -07:00
Emmanuelle Gouillart 6635cf16db [BUG] Corrected a bug in the random walker that appeared
* when returning the full probability instead of the segmentation
    * for three or more labels (two was OK)
2012-09-18 19:56:52 +02:00
Johannes Schönberger 9cc77d1138 Merge pull request #317 from tonysyu/testing-compatibility
Add `assert_greater` compatibility function.
2012-09-17 22:34:26 -07:00
JDWarner ee2092c6fa Documentation fix for labels input in random_walker.
This fix was needed because `labels` claimed it should be "of same
shape as `data`", but this is no longer always the case. When
multichannel=True, `labels` should be shaped like a SINGLE channel
of `data`, i.e. without the final dimension denoting channels.
2012-09-17 16:38:59 -05:00
Tony S Yu f2d5b109e9 Add assert_greater compatibility function.
Fix tests to work with nose < 1.1.3. Compatibility functions borrowed from scikit-learn.
2012-09-13 22:17:24 -04:00
Tony S Yu 7134a2609f DOC: Fix array formatting in doctest 2012-09-11 23:37:07 -04:00
Tony S Yu dfbbb4d766 Merge pull request #279 from emmanuelle/fix_doc
Fix doc
2012-09-02 17:13:24 -07:00
Emmanuelle Gouillart b1098f69f8 DOC: removed unused import in docstring 2012-09-02 23:21:13 +02:00
Emmanuelle Gouillart 58a57238cc Merge pull request #282 from JDWarner/multispectral_random_walker
Multispectral random walker
2012-09-02 06:23:58 -07:00
JDWarner e8ddcefae3 PEP8 compliance, removed scaling, different data parsing.
This commit represents all recommended changes since the last
commit, notably:

* PEP8 compliance (in new sections; a few old ones still
  noncompliant w/indentations)

* Moved `depth` kwarg to end of list and in docstring.
  Clarified `depth` docstring, and added section in Notes
  further explaining this parameter.

* Added section in Notes warning that for multichannel inputs,
  all channels are combined during scaling.  The user must
  separately normalize each channel prior to calling
  random_walker()

* New method for parsing data, allowing more elegant gradient
  calculation code. Probably also more extensible. The 2D
  multispectral case forced this change.

* New test: `test_multispectral_2d()`
2012-08-31 14:14:46 -05:00
Johannes Schönberger dd45f15ced Use explicit keyword for dtype 2012-08-30 09:40:54 +02:00
Johannes Schönberger bbeaec6b3f Add examples to doc string of clear_border 2012-08-30 09:36:28 +02:00
JDWarner 99238c44a5 sqrt(gradients) line removed 2012-08-29 17:07:13 -05:00
JDWarner 61320957eb Changes based on PR review recommendations: input format, scaling, and bugfix.
In this new version, all instances of 'spectrum' have been replaced with 'channel'.  The documentation also reflects this change, and the new multichannel kwarg used to indicate multichannel input is named appropriately.

New boolean multichannel kwarg added, which controls if the input has multiple channels or not.  Input 'data' is now array_like for both gray-level and multichannel.  This kwarg is needed mainly because a 3-D array could be either 3 spatial dimensions or a set of different 2-D channels.

New scaling kwarg added (may be removed in future), controlling if data scaling is applied to ALL channels or each channel individually, if multichannel=True. No effect for gray-level data.

Removed np.sqrt(gradients) in _compute_weights_3d(), which was a bug. Tests now pass consistently.

New method for maintaining shape from input to output, where dims = data.shape prior to np.atleast_3d().  A theoretical (70,100,1) array passed should now result in a (70,100,1) shaped output, for example.

Updated and fixed multispectral test script to work with new version.  TODO: Additional test(s) likely needed to cover code branches from new kwargs.
2012-08-29 16:33:56 -05:00
JDWarner 682d0535cd Added multispectral random walker test.
Since the multispectral path is equivalent except for gradient calcs,
only one test case is needed.  This test is modeled on the 3-D
non-multispectral version.  If deemed necessary, adding a 2-D case
would be simple.
2012-08-27 13:41:41 -05:00
Johannes Schönberger 1177cf1393 Move clear_border to segmentation package 2012-08-27 18:56:05 +02:00
JDWarner feca48cc49 Added return_full_prob kwarg to solve call if pyamg not present. 2012-08-27 11:48:32 -05:00