|
Hi,
I am trying to write a plugin that will measure the "contrast" between two user specified pixels and output a table as well.
Basically, I want it to work like this:
An interface opens up with two drops boxes where the user can select a few options.
The user makes a selection of two pixels on the image.
The gray values of the two pixels are collected.
The "contrast" for the second pixel will be C=(x1val-x2val)/x1val, with x1val being the gray value of the first pixel and x2val the second.
The contrast is then compared to individual values in a predefined array and the output is given as the percentage of the array value.
For example, to compare to the first array value it will do percentage1=C/arrayval1*100 and so on and then it will list all the percentage values on a table in a column.
Is it possible to do something like this? I am fairly new to java and ImageJ. I've been trying to use the methods listed in the ImageJ API but I'm still having a lot of issues.
I also read through the "writing plugins tutorial" and learned about the PlugIn types, but now I'm wondering if I make a PlugInFilter, will it also be able to output a table?
The main problems I am having so far is writing the code to produce the interface, to collect the gray values of the two pixels and to produce a table.
It would be just fine if I could make a macro instead of a plugin, but is it possible?
I would really appreciate any help or tips anyone could give me. Thanks.
Amin
|