Puncta Analyzer

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

Puncta Analyzer

Madaan, Uday
Dear All,

My name is Uday and I am a graduate student.
I am trying to analyze some confocal images stained with pre and post synaptic markers using the
puncta analyzer plugin. However I am constantly running into the same error, any help on this would be much appreciated.
Once I open an image and choose puncta analyzer plugin, the analysis options show up.
Under these options I select the red channel, green channel and the first subtract background. Followed by "set results file" and choosing the location for saving results. Once I click ok I constantly keep getting the following error message:
java.lang.NoSuchMethodError: ij.ImagePlus.getMask()[I
 at Puncta_Analyzer$ScopeImageUtils.contractHistogram(Puncta_Analyzer.java:866)
 at Puncta_Analyzer.locatePunctaInColorBand(Puncta_Analyzer.java:831)
 at Puncta_Analyzer.locatePuncta(Puncta_Analyzer.java:782)
 at Puncta_Analyzer.run(Puncta_Analyzer.java:258)
 at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:249)
 at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
 at ij.IJ.runUserPlugIn(IJ.java:185)
 at ij.IJ.runUserPlugIn(IJ.java:194)
 at ij.IJ.runPlugIn(IJ.java:150)
 at ij.Executer.runCommand(Executer.java:124)
 at ij.Executer.run(Executer.java:61)
 at java.lang.Thread.run(Unknown Source)
I am not sure why this happens. I would really appreciate some help in this matter.

Best Regards,
Uday
Uday Madaan
[hidden email]
Reply | Threaded
Open this post in threaded view
|

Re: Puncta Analyzer

dscho
Hi Uday,

On Tue, 17 Apr 2012, Madaan, Uday wrote:

> My name is Uday and I am a graduate student.
> I am trying to analyze some confocal images stained with pre and post synaptic markers using the
> puncta analyzer plugin. However I am constantly running into the same error, any help on this would be much appreciated.
> Once I open an image and choose puncta analyzer plugin, the analysis options show up.
> Under these options I select the red channel, green channel and the first subtract background. Followed by "set results file" and choosing the location for saving results. Once I click ok I constantly keep getting the following error message:
> java.lang.NoSuchMethodError: ij.ImagePlus.getMask()[I

This means that  the Puncta_Analyzer expects the a so-called "method"
(sort of a function) called getMask to return a list of integer values.
That was the case for ImageJ 1.31, but no longer for ImageJ 1.32ยน.

I fear that there are only two ways to cope with this:

1) downgrade to version 1.31 or older, or
2) get the original author to change the code.

From a quick DuckDuckGo search it appears that this plugin is only
available upon request (so much for full scientific disclosure), so even
if I wanted to fix the plugin, this mail is all I can do to help you.

>  at Puncta_Analyzer$ScopeImageUtils.contractHistogram(Puncta_Analyzer.java:866)
>  at Puncta_Analyzer.locatePunctaInColorBand(Puncta_Analyzer.java:831)
>  at Puncta_Analyzer.locatePuncta(Puncta_Analyzer.java:782)
>  at Puncta_Analyzer.run(Puncta_Analyzer.java:258)
>  at ij.plugin.filter.PlugInFilterRunner.processOneImage(PlugInFilterRunner.java:249)
>  at ij.plugin.filter.PlugInFilterRunner.<init>(PlugInFilterRunner.java:102)
>  at ij.IJ.runUserPlugIn(IJ.java:185)
>  at ij.IJ.runUserPlugIn(IJ.java:194)
>  at ij.IJ.runPlugIn(IJ.java:150)
>  at ij.Executer.runCommand(Executer.java:124)
>  at ij.Executer.run(Executer.java:61)
>  at java.lang.Thread.run(Unknown Source)
> I am not sure why this happens. I would really appreciate some help in this matter.
>
> Best Regards,
> Uday
> Uday Madaan
> [hidden email]
>
Footnote 1: for the technically inclined, see
https://github.com/fiji/ImageJA/commit/f26939388ec625d2b8308d33165a8532d056b428#diff-4

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

Re: Puncta Analyzer

amol.gharat
Hi Uday,

I am having the same problem as you. I was wondering if you found any way out of this.

Thanks,
Amol
Reply | Threaded
Open this post in threaded view
|

Re: Puncta Analyzer

toddstavish

Hi Uday,

The source code for the original puncta-analyzer was unfortunately lost. We are currently in the process of reimplementing based on ImageJ2. We plan to have feature parity to the original implementation by mid to late August 2012. You can follow the progress here.

https://github.com/physion/puncta-analyzer

-Todd
Reply | Threaded
Open this post in threaded view
|

Re: Puncta Analyzer

toddstavish

Here is the code base and binaries for puncta analyzer v1.1 (based of ImageJ 1.x):

https://github.com/physion/puncta-analyzer/tree/v1.1

We were able to decompile and re-implement the original plugin.
Reply | Threaded
Open this post in threaded view
|

Re: Puncta Analyzer

ctrueden
In reply to this post by toddstavish
Hi Todd,


> We are currently in the process of reimplementing based on ImageJ2. We
> plan to have feature parity to the original implementation by mid to late
> August 2012.


Glad to hear you are looking at using ImageJ2 for puncta-analyzer. The
ImageJ2 team would be happy to help, so please let us know if you have any
questions or problems.


> https://github.com/physion/puncta-analyzer


I took a look at your code so far. A couple of comments:

1) I see that you have a nice Maven project there, which is great. However,
I noticed that you are depending on net.imagej:ij-legacy:2.0-SNAPSHOT,
which is an obsolete version. We decided to use a major.minor.micro
versioning scheme (see http://semver.org/ for why), so the version should
be 2.0.0-SNAPSHOT.

2) Also regarding that ij-legacy dependency, to truly implement an
ImageJ2-based plugin, you would not need a dependency on ij-legacy at all,
but rather on the new ImageJ2 API in ij-core, ij-data and others. We owe
everyone a lot of documentation on how this API works, but for the moment
you can see this page for a simple example:
    http://developer.imagej.net/extensibility

Again, I'm enthusiastic to help you guys keep development rolling, so if
you run into any trouble, don't hesitate to ask for help.

Regards,
Curtis


On Mon, Jul 23, 2012 at 11:45 AM, toddstavish <[hidden email]> wrote:

> Hi Uday,
>
> The source code for the original puncta-analyzer was unfortunately lost. We
> are currently in the process of reimplementing based on ImageJ2. We plan to
> have feature parity to the original implementation by mid to late August
> 2012. You can follow the progress here.
>
> https://github.com/physion/puncta-analyzer
>
> -Todd
>
>
>
> --
> View this message in context:
> http://imagej.1557.n6.nabble.com/Puncta-Analyzer-tp4892020p4999535.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: Puncta Analyzer

dscho
In reply to this post by toddstavish
Hi Todd,

[responding publicly to remedy my mistake earlier]

On Wed, 1 Aug 2012, Todd Stavish wrote:

> > In related news: good job on the Mavenization. May I just suggest to
> > add the scijava pom as parent pom? That way, your manifest will
> > automatically contain the commit name from which the plugin was
> > compiled,
>
> Interesting, I think I saw the scijava referenced in the ij pom's. I'm
> not entirely sure how to do this though. Is there a sample pom you can
> send me to see how?

Certainly: I described this on the Fiji Wiki: http://http://fiji.sc/Maven
The relevant section is this:

        <parent>
          <groupId>org.scijava</groupId>
          <artifactId>pom-scijava</artifactId>
          <version>1.15</version>
        </parent>

        <!-- NB: for project parent -->
        <repositories>
          <repository>
            <id>imagej.releases</id>
            <url>http://maven.imagej.net/content/repositories/releases</url>
          </repository>
          <repository>
            <id>imagej.snapshots</id>
            <url>http://maven.imagej.net/content/repositories/snapshots</url>
          </repository>
        </repositories>

So: in order to make the scijava POM your POM's parent, you simply have to
add the <parent> tag (current version number is 1.17, though), and for
Maven to find it, you need to add the imagej.releases repository (the
snapshots repository is not strictly necessary, but it is there for
completeness' sake).

The scijava POM not only adds Maven repositories relevant to the ImageJ
world, but also defines a couple of useful properties:

https://github.com/scijava/scijava-common/blob/master/pom-scijava/pom.xml

In particular, you are probably interested in using ${imagej.version} in
place of 2.0.0-SNAPSHOT.

Ciao,
Johannes

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

Re: Puncta Analyzer

toddstavish
Johannes,

Thanks for the maven suggestions. Much cleaner config now. The scijava
parent eliminated the encoding warnings that I was getting too.

Just to elaborate on the decompiling that I mentioned. The original
puncta analyzer source code was lost. The original author Barry Wark
has given his permission to open source (BSD) the reimplementation.

-Todd



On Wed, Aug 1, 2012 at 12:51 PM, Johannes Schindelin
<[hidden email]> wrote:

> Hi Todd,
>
> [responding publicly to remedy my mistake earlier]
>
> On Wed, 1 Aug 2012, Todd Stavish wrote:
>
>> > In related news: good job on the Mavenization. May I just suggest to
>> > add the scijava pom as parent pom? That way, your manifest will
>> > automatically contain the commit name from which the plugin was
>> > compiled,
>>
>> Interesting, I think I saw the scijava referenced in the ij pom's. I'm
>> not entirely sure how to do this though. Is there a sample pom you can
>> send me to see how?
>
> Certainly: I described this on the Fiji Wiki: http://http://fiji.sc/Maven
> The relevant section is this:
>
>         <parent>
>           <groupId>org.scijava</groupId>
>           <artifactId>pom-scijava</artifactId>
>           <version>1.15</version>
>         </parent>
>
>         <!-- NB: for project parent -->
>         <repositories>
>           <repository>
>             <id>imagej.releases</id>
>             <url>http://maven.imagej.net/content/repositories/releases</url>
>           </repository>
>           <repository>
>             <id>imagej.snapshots</id>
>             <url>http://maven.imagej.net/content/repositories/snapshots</url>
>           </repository>
>         </repositories>
>
> So: in order to make the scijava POM your POM's parent, you simply have to
> add the <parent> tag (current version number is 1.17, though), and for
> Maven to find it, you need to add the imagej.releases repository (the
> snapshots repository is not strictly necessary, but it is there for
> completeness' sake).
>
> The scijava POM not only adds Maven repositories relevant to the ImageJ
> world, but also defines a couple of useful properties:
>
> https://github.com/scijava/scijava-common/blob/master/pom-scijava/pom.xml
>
> In particular, you are probably interested in using ${imagej.version} in
> place of 2.0.0-SNAPSHOT.
>
> Ciao,
> Johannes

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

Re: Puncta Analyzer

toddstavish
In reply to this post by ctrueden
Hi Curtis,

> 1) I see that you have a nice Maven project there, which is great. However,
> I noticed that you are depending on net.imagej:ij-legacy:2.0-SNAPSHOT, which
> is an obsolete version. We decided to use a major.minor.micro versioning
> scheme (see http://semver.org/ for why), so the version should be
> 2.0.0-SNAPSHOT.

Thanks. It looks like the pom changes suggested by Johannes are
correctly resolving to 2.0.0-SNAPSHOT.

> 2) Also regarding that ij-legacy dependency, to truly implement an
> ImageJ2-based plugin, you would not need a dependency on ij-legacy at all,
> but rather on the new ImageJ2 API in ij-core, ij-data and others. We owe
> everyone a lot of documentation on how this API works, but for the moment
> you can see this page for a simple example:
>     http://developer.imagej.net/extensibility

My basic strategy was to get the current ij1 code to compile and run
against ig-legacy, then do the port to the ImageJ2 APIs. Does this
even make sense? It builds but I get runtime errors. BTW, how do I
debug a plugin?

-Todd



>
> On Mon, Jul 23, 2012 at 11:45 AM, toddstavish <[hidden email]> wrote:
>>
>> Hi Uday,
>>
>> The source code for the original puncta-analyzer was unfortunately lost.
>> We
>> are currently in the process of reimplementing based on ImageJ2. We plan
>> to
>> have feature parity to the original implementation by mid to late August
>> 2012. You can follow the progress here.
>>
>> https://github.com/physion/puncta-analyzer
>>
>> -Todd
>>
>>
>>
>> --
>> View this message in context:
>> http://imagej.1557.n6.nabble.com/Puncta-Analyzer-tp4892020p4999535.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: Puncta Analyzer

dscho
Hi Todd,

On Wed, 1 Aug 2012, Todd Stavish wrote:

> > 1) I see that you have a nice Maven project there, which is great.
> > However, I noticed that you are depending on
> > net.imagej:ij-legacy:2.0-SNAPSHOT, which is an obsolete version. We
> > decided to use a major.minor.micro versioning scheme (see
> > http://semver.org/ for why), so the version should be 2.0.0-SNAPSHOT.
>
> Thanks. It looks like the pom changes suggested by Johannes are
> correctly resolving to 2.0.0-SNAPSHOT.

Good!

> > 2) Also regarding that ij-legacy dependency, to truly implement an
> > ImageJ2-based plugin, you would not need a dependency on ij-legacy at all,
> > but rather on the new ImageJ2 API in ij-core, ij-data and others. We owe
> > everyone a lot of documentation on how this API works, but for the moment
> > you can see this page for a simple example:
> >     http://developer.imagej.net/extensibility
>
> My basic strategy was to get the current ij1 code to compile and run
> against ig-legacy, then do the port to the ImageJ2 APIs. Does this
> even make sense?

It would make slightly more sense to compile it against ij1 directly and
then port the code to the IJ2 APIs (in particular ImgLib2). I'd suggest
using imglib2-ij to that end, to wrap the ImagePlus you get in an ImgLib2
data structure and port the data processing to ImgLib2. There are
tutorials in the "Start Here" section of http://imglib2.net/.

> It builds but I get runtime errors.

It might be more efficient a process if you could paste the exact errors
here, rather than me guessing which of the many possible problems might
occur on your side... :-)

> BTW, how do I debug a plugin?

We usually load the projects into Eclipse, using File>Import>Existing
Maven Projects...

Then we set breakpoints and load the imagej.ImageJ class and call
Run>Debug As>Java Application.

Ciao,
Johannes

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

Re: Puncta Analyzer

ctrueden
Hi Todd,

Johannes wrote:
> It would make slightly more sense to compile it against ij1 directly and
> then port the code to the IJ2 APIs (in particular ImgLib2). I'd suggest
> using imglib2-ij to that end, to wrap the ImagePlus you get in an ImgLib2
> data structure and port the data processing to ImgLib2. There are
> tutorials in the "Start Here" section of http://imglib2.net/.

To add to that, we are working on some ImageJ2 tutorials, the start of
which can be found here:
   https://github.com/imagej/imagej-tutorials

Expect to see more tutorials appearing there over the next few weeks!

Regards,
Curtis

On Mon, Aug 6, 2012 at 10:29 AM, Johannes Schindelin <
[hidden email]> wrote:

> Hi Todd,
>
> On Wed, 1 Aug 2012, Todd Stavish wrote:
>
> > > 1) I see that you have a nice Maven project there, which is great.
> > > However, I noticed that you are depending on
> > > net.imagej:ij-legacy:2.0-SNAPSHOT, which is an obsolete version. We
> > > decided to use a major.minor.micro versioning scheme (see
> > > http://semver.org/ for why), so the version should be 2.0.0-SNAPSHOT.
> >
> > Thanks. It looks like the pom changes suggested by Johannes are
> > correctly resolving to 2.0.0-SNAPSHOT.
>
> Good!
>
> > > 2) Also regarding that ij-legacy dependency, to truly implement an
> > > ImageJ2-based plugin, you would not need a dependency on ij-legacy at
> all,
> > > but rather on the new ImageJ2 API in ij-core, ij-data and others. We
> owe
> > > everyone a lot of documentation on how this API works, but for the
> moment
> > > you can see this page for a simple example:
> > >     http://developer.imagej.net/extensibility
> >
> > My basic strategy was to get the current ij1 code to compile and run
> > against ig-legacy, then do the port to the ImageJ2 APIs. Does this
> > even make sense?
>
> It would make slightly more sense to compile it against ij1 directly and
> then port the code to the IJ2 APIs (in particular ImgLib2). I'd suggest
> using imglib2-ij to that end, to wrap the ImagePlus you get in an ImgLib2
> data structure and port the data processing to ImgLib2. There are
> tutorials in the "Start Here" section of http://imglib2.net/.
>
> > It builds but I get runtime errors.
>
> It might be more efficient a process if you could paste the exact errors
> here, rather than me guessing which of the many possible problems might
> occur on your side... :-)
>
> > BTW, how do I debug a plugin?
>
> We usually load the projects into Eclipse, using File>Import>Existing
> Maven Projects...
>
> Then we set breakpoints and load the imagej.ImageJ class and call
> Run>Debug As>Java Application.
>
> Ciao,
> Johannes
>
> --
> 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: Puncta Analyzer

eagleeye232
This is a little off-topic and I apologize for posting in this thread, however, I figured since people were talking about PunctaAnalyzer here I may be able to get some help.

I think the software is great for my purpose of quantifying the number of colocalized synapses in a given image. However, I have found two major drawbacks. (1) PA is only compatiable with ImageJ 1.29 or under and (2) you cannot automate/create a macro for the plugin

My question comes from one of these drawbacks. I have about 800 images I need to analyze with punctaanalyzer. Previously I did about 300 manually but it took me hours and hours and was a huge pain. I was wondering if anyone knew of a way to automate this process. Specifically, I want to use the same exact threshhold, rolling ball radius, results output, etc.

I would really appreciate help with this, if it's possible. thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Puncta Analyzer

toddstavish
> I think the software is great for my purpose of quantifying the number of
> colocalized synapses in a given image. However, I have found two major
> drawbacks. (1) PA is only compatiable with ImageJ 1.29 or under and (2) you
> cannot automate/create a macro for the plugin

Regarding (1), the original Puncta Analyzer (PA) was written by Barry
Wark (now CEO of Physion Consulting). He was recently approached by
the original users and asked if PA could be ported to ImageJ2.  In
addition, automation features (2) were requested as part of this
effort. Unfortunately, the funding never materialized. Going forward,
the PA code base is offered as a community edition / open source.
Commercial support or implementation requests can be made to
[hidden email].

The current status is as follows:

Puncta Analyzer 1.1 using ImageJ 1.x -
https://github.com/physion/puncta-analyzer/tree/v1.1
This is a working code base. It is based off the decompilation of the
original PA byte code (the original source code was lost).

Puncta Analyzer 2.0 Legacy using ImageJ 2.0 (ij-legacy APIs) -
https://github.com/physion/puncta-analyzer/tree/v2.0-legacy
Johannes Schindelin gave some really great advice (as part of this
thread) on porting to ImgLib2 directly. However, the amount of effort
to port to ImgLib2 seems to be the same as porting to the full ImageJ2
api. This is a non-working code base. However, it may have value to
test against future releases of the legacy APIs and serve as a
regression test against the Image1 build or the full ImageJ 2 build.

Puncta Analyzer 2.0 using ImageJ 2.0 -
https://github.com/physion/puncta-analyzer
Currently, I am reviewing the ImageJ 2 samples. They look straight
forward with some nice commenting on IJ1 vs IJ2 differences.
This is the branch I am working on as time and interest allows. With
respect to the automation question, IJ should be able to macro script
plugins, but I don't know much about the macro system. Since PA 1.0
uses a sequence of plugins, it may not be possible to script "into"
that sequence to set parameters of each step. PA 2.0 should be much
more amenable to scripting. We set up a CI server for testing and
builds. Contributors are welcome.

-Todd