Problem with Import: "Cannot resolve symbol 'ImageJ'"

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem with Import: "Cannot resolve symbol 'ImageJ'"

RMaas
Hey
I am a total newbie in developing for ImageJ. I followed this article to set up IntelliJ:
http://imagej.net/Developing_ImageJ_in_IntelliJ_IDEA

and want to compile this class:
https://gist.github.com/ctrueden/5162760

But the import statements for ImageJ, command and widget won’t work because the symbol cannot be resolved.
Is there a newer Git for ImageJ which contains this and I imported the wrong one? Or are there other things I must do to use this class?

Best regards
RMaas
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Import: "Cannot resolve symbol 'ImageJ'"

ctrueden
Hi RMaas,

> But the import statements for ImageJ, command and widget won’t work
> because the symbol cannot be resolved.

The gist you referenced had not been updated for several years. Since then,
the package prefixes changed, and ImageJ2 has stabilized.

I updated the gist to work with the latest version of ImageJ2:

https://gist.github.com/ctrueden/5162760

Regards,
Curtis

--
Curtis Rueden
LOCI software architect - https://loci.wisc.edu/software
ImageJ2 lead, Fiji maintainer - https://imagej.net/User:Rueden
Did you know ImageJ has a forum? http://forum.imagej.net/


On Mon, May 15, 2017 at 12:29 PM, RMaas <[hidden email]> wrote:

> Hey
> I am a total newbie in developing for ImageJ. I followed this article to
> set
> up IntelliJ:
> http://imagej.net/Developing_ImageJ_in_IntelliJ_IDEA
>
> and want to compile this class:
> https://gist.github.com/ctrueden/5162760
>
> But the import statements for ImageJ, command and widget won’t work because
> the symbol cannot be resolved.
> Is there a newer Git for ImageJ which contains this and I imported the
> wrong
> one? Or are there other things I must do to use this class?
>
> Best regards
> RMaas
>
>
>
>
> --
> View this message in context: http://imagej.1557.x6.nabble.
> com/Problem-with-Import-Cannot-resolve-symbol-ImageJ-tp5018721.html
> Sent from the ImageJ mailing list archive at Nabble.com.
>
> --
> ImageJ mailing list: http://imagej.nih.gov/ij/list.html
>

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: Problem with Import: "Cannot resolve symbol 'ImageJ'"

RMaas
Wow thank you for your amazing fast answere and the new gist!
Maybe you also can help me with my next step, I reduce the code from the gist, so that only the rating section exist anymore. Now I want to use this class to open when I start my plugin and hand over the selection of the user.

My plugin looks something like that:

Public class editing_ implements PlugInFilter{
        …
        Public int setup (String arg, ImagePlus img){
        // stuff that happening with the new created image (Safe as, no empty name, …)
        }
        Public void run(Imageprocessor ip){
              //main function of the plugin (take a picture and create a new one out of it with prediction),
                 there are two possible methods implemented and if would be
                 awesome that I could hand over the string from the selected checkbox so I can use a switch
                 to choose which should be used in this case
        }
}

Is there a smart way to do it? Something like a class call in run or setup so that at the begin the window of MultipleChoice appears (no need for the second windows to display the choice) and then start run the run-method with the user choice?

Best regards