Nikea / xray-vision

Visualization widgets and plotting helpers targeted at X-Ray Sciences
Other
5 stars 13 forks source link

Manual mask mk2 #62

Closed tacaswell closed 9 years ago

tacaswell commented 9 years ago

This is ready for review

ericdill commented 9 years ago

Sorry that I'm leaving comments on the commits. I'm using the github app for Android and I can not do in line on the total diff

danielballan commented 9 years ago

I like shift flipping the sign of the lasso.

tacaswell commented 9 years ago

I had wanted to use the right mouse button to do the inversion, but only paying attention to the left mouse button is hard-coded in do Lasso :disappointed:

tacaswell commented 9 years ago

but it has been like that since 2006 when JDH added it https://github.com/matplotlib/matplotlib/commit/c8f36bc5ac74e4504dafc9e636cf3cdc7e10777d .

danielballan commented 9 years ago

"alt" is actually the traditional choice in Photoshop / Paint Shop Pro / etc.

On Thu, May 14, 2015 at 9:40 AM Thomas A Caswell notifications@github.com wrote:

but it has been like that since 2006 when JDH added it c8f36bc5ac74e4504dafc9e636cf3cdc7e10777d.

— Reply to this email directly or view it on GitHub https://github.com/Nikea/xray-vision/pull/62#issuecomment-102041217.

sameera2004 commented 9 years ago

Nice I like the new changes

tacaswell commented 9 years ago

I think I have addressed everything. Anything else?

tacaswell commented 9 years ago

duh, the example I haven't finished yet!

ericdill commented 9 years ago

Would it be painful to implement shift as a modifier that draws a straight line from the last point to the current mouse position?

tacaswell commented 9 years ago

Do you mean draw that as a line of pixels or to do that as the side of a polygon? Adding a polygon mode would not be too hard, probably a few hours of my time.

I also have code that lets you click off points and it will do a best-fit spline to those points which would be a couple of hours to integrate.

The end game here is exposing a path with Bezier control points.

There is also all of the selection widgets in skimage which we should look at using.

Those last three things all require a slightly more sophisticated UI as you need to be able do modal input.

On Fri, May 15, 2015 at 10:51 AM Eric Dill notifications@github.com wrote:

Would it be painful to implement shift as a modifier that draws a straight line from the last point to the current mouse position?

— Reply to this email directly or view it on GitHub https://github.com/Nikea/xray-vision/pull/62#issuecomment-102419717.

ericdill commented 9 years ago

Yeah, I guess I was thinking of something along the lines of the lines with bezier control points. Sometimes you actually want to have polygon edges though (think beam stop arm holder), so being able to drag the corners of a polygon without curvy edges would be useful too

danielballan commented 9 years ago

I would love to see that integrated, but I think we should reuse others' work here as much as possible. That sounds really hard to get right.

On Fri, May 15, 2015 at 11:12 AM Eric Dill notifications@github.com wrote:

Yeah, I guess I was thinking of something along the lines of the lines with bezier control points. Sometimes you actually want to have polygon edges though (think beam stop arm holder), so being able to drag the corners of a polygon without curvy edges would be useful too

— Reply to this email directly or view it on GitHub https://github.com/Nikea/xray-vision/pull/62#issuecomment-102427662.

sameera2004 commented 9 years ago

Earlier I tried to do something like Image_inspector (https://github.com/blink1073/image_inspector)- @ericdill recommended this. They have all the options like lines, ellipse, polygons, rectangles, etc....

However, @tacaswell didn't like the idea of having UI for manual mask,better to have a auto mask, and Andrei didn't like the idea of having auto mask... etc.. Then I decided only have simple one, earlier I tried a version of polygon too.

Take a look at Image_inspector

tacaswell commented 9 years ago

I was apparently confused, I thought that was much more tightly coupled into skimage and their qt framework.

sameera2004 commented 9 years ago

Yes, it was not easy and (I had issues opening new matplotlib libraries in my mac?- separate mac issue). However, they have all sort of options. Yes I think selection widgets in skimage should be more helpful @tacaswell as you suggested

tacaswell commented 9 years ago

I am in favor of merging this as-is to get something functional in front of users and then adding in the bells and whistles they ask for.

@sameera2004 I meant the opposite, the tools in skimage are (to my understanding) very tightly coupled to some qt objects they have that manage inter-widget communication. the image_inspector project is completely decoupled from skimage/qt which is why it is more useful.

sameera2004 commented 9 years ago

@tacaswell ok sure, Thanks for the clarification, yes I found image inspector more useful that is why I mentioned that we can take a look -it. Anyway I got confused with your earlier comment, As I told I had issues with opening some -mac issues. It took while to figure them...

Yes, it is good if we can add more options like, line, polygon, etc..later.. However, it will only take few of your hours to add them !!

Yes it is good we have this for users,