I’m quite a novice at imagej macro programming and specifically with macro tools. I asked before in this thread how to program a macro tool. I’ve been more or less able to accomplish what I wanted to do, but I am stuck at a half functioning tool. the old thread is dead, so I thought I’d ask my specific problem again here.
I have a macro tool that is basically a line tool. But it draws two perpendicular lines on each end of the line as orientation (so you can measure things orthogonal to certain structures). A major drawback is, that the orientational line overlays are only drawn after you draw the “main line” that gets measured. I’d like them to be drawn live and change their location / shape accordingly while the user is dragging the “main line” (see unresolved last answer in previous topic).
I’ve searched all the ImageJ documentation on macros, macro tools and builtin functions, but I can’t really make sense of it. What I am missing is what specific mouse flags symbolize what action, and in what loop to put what function. I am only good at programming in python 3.6+ and I don’t know any java. So programming this is really difficult for me and the Jython extension also doesn’t really help.
I’d be super thankful if anyone could give me some hints / program it for me / point me to resources on how to do it.