Plot curve fitting values of ROIs into an image-like map

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

Plot curve fitting values of ROIs into an image-like map

ys
Hi, there,
Please give me some help, share an idea on how to plot a batch of ROI values back into their map and make a "pseudo-image".
I have an image series from time-lapse imaging. And I am trying to see the temporal trend of all ROIs from the full image. And to show the trend back into an image like map.
Here is what I did,
And an ROI array was generated following a post, http://imagej.1557.x6.nabble.com/How-to-create-a-regular-grid-of-rectangular-ROI-s-tp3685056.html,
Then the mean value of ROIs could be read out and exported to my curve fitting software, Graphpad Prism, and after fitting I will get the curve parameters.

The problem is that I don't know how to plot the results from curvefitting, which is a linear sequence of values, back into the image. I don't know how to read the values and fill it back into the corresponding ROI to make an image.


Reply | Threaded
Open this post in threaded view
|

Re: Plot curve fitting values of ROIs into an image-like map

Michael Schmid
Hi Yongli,

it is not clear what you want.

(1) Write the numbers of your fit as ROI labels, so you can read them as numbers in the overlay?
  See the macro commands roiManager("select", index), and roiManager("Rename", theNewLabel)

(2) Change the pixel values of each ROI, so that its pixel value matches that you got from the external fitting process?
  See roiManager("select", index) and run("Set...", "value=&theNewPixelValue");
  [the latter is the macro call for Process>Math>Set]

In both cases, you need a loop over the rois [see roiManager("count")] and read the value from a file written by the external fitting program.
  For reading a file, see File.openAsString(path), lines=split(str,"\n"), parseFloat(string)

Note that ImageJ can also do curve fitting for functions of one variable, see the Fit macro commands. For fit functions that are not built into ImageJ (user-defined functions), specialized software will be better in most cases, however.

Michael
________________________________________________________________
On Nov 3, 2015, at 17:52, ys wrote:

> Hi, there,
> Please give me some help, share an idea on how to plot a batch of ROI values
> back into their map and make a "pseudo-image".
> I have an image series from time-lapse imaging. And I am trying to see the
> temporal trend of all ROIs from the full image. And to show the trend back
> into an image like map.
> Here is what I did,
> And an ROI array was generated following a post,
> http://imagej.1557.x6.nabble.com/How-to-create-a-regular-grid-of-rectangular-ROI-s-tp3685056.html,
> Then the mean value of ROIs could be read out and exported to my curve
> fitting software, Graphpad Prism, and after fitting I will get the curve
> parameters.
>
> The problem is that I don't know how to plot the results from curvefitting,
> which is a linear sequence of values, back into the image. I don't know how
> to read the values and fill it back into the corresponding ROI to make an
> image.

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
ys
Reply | Threaded
Open this post in threaded view
|

Re: Plot curve fitting values of ROIs into an image-like map

ys
This post was updated on .
Michael,
Thank you for your kindly response.
The (2) is what I want.
I will try  a loop of roiManager, File.openAsString and set value.
Just tried ROImanager and it can take 256x256 ROIs and didn't overflow, so maybe a pixel-wise analysis can be done.
Thanks!