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

HowTo wishlist #80

Open
1 of 23 tasks
frauzufall opened this issue Nov 28, 2019 · 15 comments
Open
1 of 23 tasks

HowTo wishlist #80

frauzufall opened this issue Nov 28, 2019 · 15 comments

Comments

@frauzufall
Copy link
Member

frauzufall commented Nov 28, 2019

Who has more questions?

Can others edit this post? If not, just answer and I update the list. We could also add the user handle next to a question if someone volunteers to solve a specific one-

@haesleinhuepf
Copy link
Member

haesleinhuepf commented Nov 29, 2019

Hey @frauzufall ,

I ❤️ your initiative! There are indeed some things I've never managed in ImageJ2 and would love to learn how to do them. I link some half-backed solutions for these questions and some solutions only in ImageJ1:

Thanks again for your efforts! If you point me to better solutions answering my questions, I'm happy to help to write the HowTo-code 🎄

Cheers,
Robert

@frauzufall
Copy link
Member Author

Hi Robert, thanks for the questions and links, I'll look into it! Btw, here is a PR with some improvements from the discussion in the last PR #79

Another quite straightforward thing to do would be to translate these IJ2 script templates into Java.. And sort them into the HowTos.. And vice versa. (Though I would prefer groovy) Then the HowTos would also be available from the script editor directly as templates. And if @ctrueden or someone else finds a way to do the translation automatically at some point, even better!

@haesleinhuepf
Copy link
Member

Hey @frauzufall

Great! I'm happy to take the translation of the scripts over. For 11 files I would not invent an automatic translation algorithm ;-)

Is there a HOWTO-template and short description available of what a HOWTO-writer should take into account?

Thanks!

🐰

@frauzufall
Copy link
Member Author

@haesleinhuepf cool! I added a readme and template to #79. Let me know if it's useful or needs improvement!

@haesleinhuepf
Copy link
Member

haesleinhuepf commented Dec 1, 2019

Hey @frauzufall,

while translating the script templates, some additional questions came up:

I may add some more while translating ;-)

@lhilbert
Copy link

lhilbert commented Dec 1, 2019

How to carry out pixel level mathematical operations like I can in Matlab? Full access to indices, values, logical operations etc.

@imagejan
Copy link
Member

imagejan commented Dec 1, 2019

@haesleinhuepf wrote:

How to iterate a HyperSphere in Java

HyperSphere<T> implements Iterable<T>, so it should work exactly as in the Jython example, no?

@haesleinhuepf
Copy link
Member

it should work exactly as in the Jython example, no?

I couldn't find out how. My IntelliJ gives a bit a weird error message

image

@imagejan
Copy link
Member

imagejan commented Dec 1, 2019

In this ImgLib2 example it seems to work.

@haesleinhuepf
Copy link
Member

I think the problem is, neither IntelliJ nor the code writer can know what U is. A problem introduced by Java generics....

@imagejan
Copy link
Member

imagejan commented Dec 1, 2019

neither IntelliJ nor the code writer can know what U is.

That's why you have to put U extends RealType< U > in the class/method signature, as shown in the example as well. I'd be very surprised if IntelliJ couldn't handle generics well. I'd recommend using Eclipse then ;-)

@haesleinhuepf
Copy link
Member

haesleinhuepf commented Dec 1, 2019

That's why you have to put U extends RealType< U >

But it's DoubleType and not RealType<U>, look here:
https://github.com/imagej/tutorials/blob/adding_scripting_templates/howtos/src/main/java/howto/processing/CreateAndConvolvePoints.java#L60

@imagejan
Copy link
Member

I added a point by editing the ↗️ original post.

@ctrueden
Copy link
Member

ctrueden commented Feb 4, 2020

I merged #79, in case that affects the checklist here at all.

@frauzufall
Copy link
Member Author

Thanks @ctrueden!

@haesleinhuepf, do you plan to continue with the scripts or should I continue from you branch https://github.com/imagej/tutorials/commits/adding_scripting_templates? Should we go over it together at some point?

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

No branches or pull requests

5 participants