Login  Register

Re: Line profile seems to filter data

Posted by Wayne Rasband-2 on Nov 14, 2018; 7:22am
URL: http://imagej.273.s1.nabble.com/Line-profile-seems-to-filter-data-tp5021433p5021456.html

> On Nov 9, 2018, at 4:59 PM, Mark Senko <[hidden email]> wrote:
>
> If I draw a line with a width greater than 1 and generate a profile plot, the peaks in my data are progressively suppressed the further towards the right I am on the plot. It's almost as if there is a running average filter that gets wider as I move along the data set. The suppression shows up when the points are listed.
> Generating a profile from a rectangle of the same size does not show this effect. Has anyone else seen this?

Thanks to Michael Schmid, this bug is fixed in the latest ImageJ daily build (1.52i41). Here is a macro that reproduces the bug:

  newImage("TestImage", "16-bit random", 4096, 512, 1);
  sx = 50;  // coords of UL corner of rectangle
  sy = 200;
  h = 300;
  w = 4500;
  makeRectangle(sx,sy,w,h);
  prof = getProfile();
  Plot.create("Prof Rect","rel pix","sig",prof);
  yline = sy+ h/2;
  makeLine(sx,yline,sx+w,yline,h);
  prof2 = getProfile();
  Plot.setColor("red");
  Plot.add("line",prof2);
  Plot.add("circle",prof2);
  Plot.setColor("black");
  Plot.show();

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html