Having trouble running Linear Hough Transform plug-in from Burger & Burge

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

Having trouble running Linear Hough Transform plug-in from Burger & Burge

Chuck Harrison-2
Hi all,

I recently downloaded and installed the Chapter 9 code from Burger &
Burge, dated 27 Jan 2010
http://www.imagingbook.com/index.php?id=98

I get an error
java.lang.NoSuchMethodError: hough.LinearHT.getMaxLines(II)Ljava/util/List;
        at Plugin_Hough_Linear.run(Plugin_Hough_Linear.java:86)

As near as I can tell, the method is properly defined in LinearHT.java.

I am not very sophisticated with Java...anyone have a suggestion?

Thanks in advance,
  Chuck
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble running Linear Hough Transform plug-in from Burger & Burge

dscho
Hi,

On Fri, 23 Jul 2010, Chuck Harrison wrote:

> I get an error
> java.lang.NoSuchMethodError: hough.LinearHT.getMaxLines(II)Ljava/util/List;
> at Plugin_Hough_Linear.run(Plugin_Hough_Linear.java:86)

This error typically occurs when you compiled against another version of
the class (in this case, hough.LinearHT) than you have available in your
classpath.

One possibility is that you edited LinearHT.java and compiled that class
after compiling Plugin_Hough_Linear.java.

Another is that you have multiple versions of LinearHT.class in your class
path.

If that does not help you along, I am afraid I need to see your source
code to help further.

Hth,
Johannes
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble running Linear Hough Transform plug-in from Burger & Burge

Rasband, Wayne (NIH/NIMH) [E]
In reply to this post by Chuck Harrison-2
On Jul 23, 2010, at 4:51 PM, Chuck Harrison wrote:

> Hi all,
>
> I recently downloaded and installed the Chapter 9 code from Burger &
> Burge, dated 27 Jan 2010
> http://www.imagingbook.com/index.php?id=98
>
> I get an error
> java.lang.NoSuchMethodError: hough.LinearHT.getMaxLines(II)Ljava/util/List;
> at Plugin_Hough_Linear.run(Plugin_Hough_Linear.java:86)
>
> As near as I can tell, the method is properly defined in LinearHT.java.
>
> I am not very sophisticated with Java...anyone have a suggestion?

It works for me. I copied the ch9 folder into the ImageJ plugins folder, opened Plugin_Hough_Linear.java by dragging and dropping it onto the "ImageJ" window, and compiled it by pressing ctrl-r (File>Compile and Run).

Here is what the directory structure looks like:

  ImageJ
     plugins
        ch9
           hough
           images
           Plugin_Hough_Linear.java

-wayne

   
Reply | Threaded
Open this post in threaded view
|

Re: Having trouble running Linear Hough Transform plug-in from Burger & Burge

Chuck Harrison-2
In reply to this post by dscho
Thanks, Johannes,

> Another is that you have multiple versions of LinearHT.class in your class
> path.
That was it; I had another version of LinearHT buried in my directories.

Bless you!
  Chuck

On Fri, Jul 23, 2010 at 3:09 PM, Johannes Schindelin
<[hidden email]> wrote:

> Hi,
>
> On Fri, 23 Jul 2010, Chuck Harrison wrote:
>
>> I get an error
>> java.lang.NoSuchMethodError: hough.LinearHT.getMaxLines(II)Ljava/util/List;
>>       at Plugin_Hough_Linear.run(Plugin_Hough_Linear.java:86)
>
> This error typically occurs when you compiled against another version of
> the class (in this case, hough.LinearHT) than you have available in your
> classpath.
>
> One possibility is that you edited LinearHT.java and compiled that class
> after compiling Plugin_Hough_Linear.java.
>
> Another is that you have multiple versions of LinearHT.class in your class
> path.
>
> If that does not help you along, I am afraid I need to see your source
> code to help further.
>
> Hth,
> Johannes
>
>