Skip to content

Commit

Permalink
raise NotImplementedError for enforce_connectivity and slic_zero
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Irving committed Sep 23, 2016
1 parent bc29680 commit 11377d3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ Simple linear iterative clustering (SLIC) in a region of interest

## Development
This code is still a work in progress. The following issues still need to be resolved:
- [ ] Fix for calculating mean distance between points to improve compactness calculation (in progress)
- [ ] Fix the enforce connectivity method to work with maskSLIC

## Outline
Expand Down
10 changes: 9 additions & 1 deletion maskslic/slic_superpixels.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# coding=utf-8

from __future__ import division, absolute_import, unicode_literals, print_function
import collections as coll
import numpy as np
from scipy import ndimage as ndi
Expand Down Expand Up @@ -304,6 +304,14 @@ def slic(image, n_segments=100, compactness=10., max_iter=10, sigma=0,
"""

if enforce_connectivity:
raise NotImplementedError("Enforce connectivity has not been implemented yet for maskSLIC.\n"
"Please set enforce connectivity to 'False' ")

if slic_zero:
raise NotImplementedError("Slic zero has not been implemented yet for maskSLIC.")


img = np.copy(image)
if mask is not None:
msk = np.copy(mask==1)
Expand Down

0 comments on commit 11377d3

Please sign in to comment.