Dear all,
my name is Max and i am from Germany.
I just bought this (
http://www.imagingbook.com/) very nice book , authors Burger and Burge.
Found this forum, while looking for an answer to a little exercise where i got stuck.
In the german version it was exercise 4.2., page 52.
I try to translate it correctly:
Exercise was to programm a plugin, which should be displayed in ImageJ after sum calculation.
My problem is, that i don't know how to update the histogram.
here is the (small) code:
////////////////////begin code:
public class ComputeCulmulatedHistogram_ implements PlugInFilter{
public int setup(String arg, ImagePlus img){
return DOES_8G+NO_CHANGES;
}
public void run(ImageProcessor ip){
int H[]=ip.getHistogram(); //histogram data of current picture
for(int i=1;i<H.length;i++) //modifa histogram data
{H[i]=H[i]-1+H[i];H[i]=125;
}
}
}
//////////////////////end code
My problem now is how to show the updated histogram.
I would be very grateful, if someone could help me out.
Best Regards from Germany
Max
P.S.: i appologize, if this is too low level for you, but i just started with ImageJ <smiley image='smile.png' text=':)' />