how to influence result table?

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

how to influence result table?

jarek-6
hello everyone,

i work with particle analyzing, in my procedure i use standard settings
of ij, but in final step when results are presented before exported to
excel, it would be nice if one could set down and upper limits for
results - in some cases i reach values that exceed tha range and those
values should be deleted.
any suggestions?
greetings

jarek grodek
Reply | Threaded
Open this post in threaded view
|

Re: how to influence result table?

Michael Miller
I have just what you need.

Declare your own ResultsTable!

protected ResultsTable rt;

With each new data entry, you should:
  rt.incrementCounter();
  int column = 1;
  rt.addLabel("Entry Title", entryNameString);

  rt.addValue(column, doubleValueOfYourData);
  rt.setHeading(column++,"The Parameter This Represents");

When you're done filling the columns of that entry, make a call to a method
like this:

 protected void displayResults() {
  int counter = rt.getCounter();
  if (!IJ.isResultsWindow()) {
   IJ.setColumnHeadings(rt.getColumnHeadings());
  }
  String resultsLine = rt.getRowAsString(counter-1);
  // display to the ImageJ table
  IJ.write(resultsLine);
}

You can populate the table with specifically whatever results you want. And
this is the step that you could manually filter out the ones which exceed
your upper limits.

The only problem with my described method is you mentioned that you perform
particle analyzing, and I still don't know how to access the
ParticleAnalyzer from within a plugin and get it's individual results. It
sure would be nice if somebody answered my original question to the list
"Extracting information from other plugins" *cough*

Since my way isn't complete without this final catch... maybe somebody can
help us both out and answer that final step?

Of course hopefully there are other, completely different methods. If
anybody knows better methods, especially IJ. and ImageJ calls or run
commands to do the same, please let us know :-)

-Mike

----- Original Message -----
From: "jarek" <[hidden email]>
To: <[hidden email]>
Sent: Friday, November 03, 2006 4:41 AM
Subject: how to influence result table?


> hello everyone,
>
> i work with particle analyzing, in my procedure i use standard settings of
> ij, but in final step when results are presented before exported to excel,
> it would be nice if one could set down and upper limits for results - in
> some cases i reach values that exceed tha range and those values should be
> deleted.
> any suggestions?
> greetings
>
> jarek grodek
Reply | Threaded
Open this post in threaded view
|

AW: how to influence result table?

Lucas, Falk /BDF HAM
In reply to this post by jarek-6
Hi,

if using  the macro language, one can do something like this summarize function.
All you have to add, is the restriction to an upper and lower level.

I use this function to write to str to an file. One can omit the replace commands, if one doesn't need to convert the decimal dot to a comma.

function summarize() {
                str = "";
                mean = 0;
                total = 0;
               
                for (i=0; i < nResults; i++) {
                        meanI = getResult("Area",i);
                        mean += meanI;
                       
                        str=str+ i + "\t" + replace(meanI, ".", ",") + " \n";

                }
                total = mean;
                mean /= nResults;
                str = "Count:\t" + nResults + " \n"+ "TotalArea:\t" + replace(total, ".", ",") + " \n"
                        +"Mean:\t" + replace(mean, ".", ",")+ " \n"+str;
                return str;
        }

Falk

-----Ursprüngliche Nachricht-----
Von: ImageJ Interest Group [mailto:[hidden email]] Im Auftrag von jarek
Gesendet: Freitag, 3. November 2006 11:42
An: [hidden email]
Betreff: how to influence result table?

hello everyone,

i work with particle analyzing, in my procedure i use standard settings of ij, but in final step when results are presented before exported to excel, it would be nice if one could set down and upper limits for results - in some cases i reach values that exceed tha range and those values should be deleted.
any suggestions?
greetings

jarek grodek

_____________________  Confidentiality  _____________________

This electronic transmission is strictly confidential and intended
solely for the addressee.  It may contain information which is covered
by legal, professional or other privilege.  If you are not the intended
addressee, you must not disclose, copy or take any action in reliance
of this transmission.  If you have received this transmission in error,
please notify us and delete the received data as soon as possible.

This footnote also confirms that this email message has been swept
for the presence of computer viruses.
_______________________________________________________