Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Master #25

Merged
merged 7 commits into from
Mar 4, 2017
Merged

Master #25

merged 7 commits into from
Mar 4, 2017

Conversation

xraynaud
Copy link
Contributor

Hi, I made an attempt to control the length of detected lines (issue #4). Two new parameters (minLength and maxLength) and a new Line method
(prune) allow to remove lines that don’t have the correct size. The new
method does not alter the detected junction points (so that junction
points are not in sync after lines removal).

This is a first attemps to control the length of detected lines (issue
. Two new parameters (minLength and maxLength) and a new Line method
(prune) allow to remove lines that have not the correct size. The new
method does not alter the detected junction points (so that junction
points are not in sync after lines removal).
@thorstenwagner
Copy link
Owner

Great! Thank you! I guess we should add the sync with the junction points before merging it into the master branch. I would like to keep the data consistent.

…esponding junctions

Adds the possibility to remove lines depending on their length and
remove the corresponding junctions as well.
@xraynaud
Copy link
Contributor Author

Hi, I reworked the code so that it now removes the junctions as well. I am not totally satisfied with the code as it needs two loops to do so (one to remove the junctions and one to remove the lines), but I couldn't find a way to do it in a single loop (it throws concurentModificationException). Btw, are you sure that your function deleteContour does not lead to concurentModificationException too ? My first plan was to use this function to remove both junctions and lines at the same time, but it always throws this exception.

I don't have fully tested what happens with the ExtendLine option as I am not sure to understand what it does (it seems to shorten lines in some cases).
Cheers.

the second loop.
Replaced the deleteContour function with the deleteJunction function to
avoid concurrentModificationException when deleting several contours at
once.
@xraynaud
Copy link
Contributor Author

It seems that with length selection, overlap resolution method SLOPE does not work anymore. I'll be looking into this.

…lap resolver option SLOPE.

This is a workaround to make the plugin works with line length control
and overlap resolver option SLOPE. The problem arises from an
inconsistency between the content of junctions cont1 and cont2 when
using overlapOption.NONE or overlapOption.SLOPE. In the first case,
cont1 and cont2 refers to lines indices in the Arraylist, while in the
second case, cont1 and cont2 refers to lines ID.
The commit makes the plugin works, but the kept junctions are still
inconsistent with the removed lines when SLOPE is selected.
@thorstenwagner
Copy link
Owner

Very nice! Thanks.
I'm sorry that there are inconsistencies in the code. I will check and merge as soon as possible!

Changed makeBinary function to also draw estimated width when Estimate
Width is ticked. When applying the plugin on a multi stack Composite
image, the binary image produced contains the same number of channels
and slices than the original image, each containing a binary image of
the detected lines. LUT of composite image is kept in binary image.
@thorstenwagner thorstenwagner merged commit df0d3b8 into thorstenwagner:master Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants