More ResultsTable Problems

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

More ResultsTable Problems

David Webster
Wayne/All,

There is a problem with ResultsTable for daily build 1.43k8.
If you run filter show below, you get these tow differing results.

1.43j
  A B C
1 0 2 3

1.43k8
  A A B C
1 0 0 2 3

import ij.plugin.*;
import ij.measure.ResultsTable;
public class TestResultsTable implements PlugIn
{
        public void run(String arg)
        {
                ResultsTable rt  = new ResultsTable();
                rt.reset();
                rt.setHeading(1, "A");
                rt.setHeading(2, "B");
                rt.setHeading(3, "C");  
                rt.incrementCounter();
                rt.addValue("A", 0);
                rt.addValue("B", 2);
                rt.addValue("C", 3);
                rt.show("TestResults Table");
               
        }
}

David Webster
Reply | Threaded
Open this post in threaded view
|

Re: More ResultsTable Problems

Wayne Rasband
You can work around this problem by not calling ResultsTable.setHeading
(), for example

    ResultsTable rt  = new ResultsTable();
    rt.incrementCounter();
    rt.addValue("A", 0);
    rt.addValue("B", 2);
    rt.addValue("C", 3);
    rt.show("TestResults Table");

or by calling setHeading(), but starting with column 0 instead of  
column1

    ResultsTable rt  = new ResultsTable();
    rt.setHeading(0, "A");
    rt.setHeading(1, "B");
    rt.setHeading(2, "C");
    rt.incrementCounter();
    rt.addValue("A", 0);
    rt.addValue("B", 2);
    rt.addValue("C", 3);
    rt.show("TestResults Table");

-wayne

On Nov 7, 2009, at 2:16 AM, David William Webster wrote:

> Wayne/All,
>
> There is a problem with ResultsTable for daily build 1.43k8.
> If you run filter show below, you get these tow differing results.
>
> 1.43j
> A B C
> 1 0 2 3
>
> 1.43k8
> A A B C
> 1 0 0 2 3
>
> import ij.plugin.*;
> import ij.measure.ResultsTable;
> public class TestResultsTable implements PlugIn
> {
> public void run(String arg)
> {
> ResultsTable rt  = new ResultsTable();
> rt.reset();
> rt.setHeading(1, "A");
> rt.setHeading(2, "B");
> rt.setHeading(3, "C");
> rt.incrementCounter();
> rt.addValue("A", 0);
> rt.addValue("B", 2);
> rt.addValue("C", 3);
> rt.show("TestResults Table");
>
> }
> }
>
> David Webster
Reply | Threaded
Open this post in threaded view
|

Re: More ResultsTable Problems

David Webster
Wayne,

Hmm! It seems like either 1.43j or 1.43k8 has a bug. When I read the API for

"addValue(String column_name, double value)" it sort of implies that the
value goes to the column with the matching name column_name , if it exists.
Otherwise, column_name would be added to the table. It doesn't say anything
 about column number.

David

On Sat, Nov 7, 2009 at 9:22 AM, Wayne Rasband <[hidden email]> wrote:

> You can work around this problem by not calling ResultsTable.setHeading(),
> for example
>
>   ResultsTable rt  = new ResultsTable();
>
>   rt.incrementCounter();
>   rt.addValue("A", 0);
>   rt.addValue("B", 2);
>   rt.addValue("C", 3);
>   rt.show("TestResults Table");
>
> or by calling setHeading(), but starting with column 0 instead of column1
>
>   ResultsTable rt  = new ResultsTable();
>   rt.setHeading(0, "A");
>   rt.setHeading(1, "B");
>   rt.setHeading(2, "C");
>
>   rt.incrementCounter();
>   rt.addValue("A", 0);
>   rt.addValue("B", 2);
>   rt.addValue("C", 3);
>   rt.show("TestResults Table");
>
> -wayne
>
>
> On Nov 7, 2009, at 2:16 AM, David William Webster wrote:
>
> Wayne/All,
>>
>> There is a problem with ResultsTable for daily build 1.43k8.
>> If you run filter show below, you get these tow differing results.
>>
>> 1.43j
>>        A       B       C
>> 1       0       2       3
>>
>> 1.43k8
>>        A       A       B       C
>> 1       0       0       2       3
>>
>> import ij.plugin.*;
>> import ij.measure.ResultsTable;
>> public class TestResultsTable implements PlugIn
>> {
>>        public void run(String arg)
>>        {
>>                ResultsTable rt  = new ResultsTable();
>>                rt.reset();
>>                rt.setHeading(1, "A");
>>                rt.setHeading(2, "B");
>>                rt.setHeading(3, "C");
>>                rt.incrementCounter();
>>                rt.addValue("A", 0);
>>                rt.addValue("B", 2);
>>                rt.addValue("C", 3);
>>                rt.show("TestResults Table");
>>
>>        }
>> }
>>
>> David Webster
>>
>
Reply | Threaded
Open this post in threaded view
|

Live analysis of video input from USB camera on Windows PC

Conor Creedon
Hi there,

I am trying to use ImageJ to display directly and perform analysis on
the live feed from a USB connected camera on a Windows PC. I have looked
at the available documentation as well as previous discussions on the
topic but am still having difficulties. The first is that the WinVDIG
application displays the video as pixelated pseudo-coloured images and
that is what I also see when I use the Import Video option in ImageJ
(QuickTime etc. is correctly installed and all settings appear correct).
The second issue is that I want to convert the video into 8-bit images
before it is displayed in ImageJ and also apply LUTs, while spitting out
stats in the background using a macro. Perhaps this is asking too much?
The application relates to the semi-automatic alignment of the focussing
optics on a linelight illumination product.

Any feedback from someone with experience in this area would be
appreciated.


Thanks,

Conor.