Image profiles

Is there any option in CellProfiler, which allow to make an Image profiles?
Just like in OriginLab?


Yes and no.

No: There is nothing built in CellProfiler to do this. CellProfiler is generally designed for automated image processing. I assume you want to draw a line interactively, and I don’t know of a way to get this without programming.

**Yes: ** You can do this in an automated way using the RunImageJ module. Any process that you can write a macro for in ImageJ ought to work with RunImageJ in CP. In ImageJ, the command is Analyze -> Plot Profile, so to get the macro commands from ImageJ, I just ran Plugins -> Macros -> Record, then proceeded to “Plot Profile”. The output was this:

makeLine(1, 231, 512, 231); run("Plot Profile");

Now in CP, choose Macro in RunImageJ. Put the above commands into the Macro window and you will get something akin to the attached image. The caveat is that you have to know the coordinates of the profile line in advance (plus I am not sure how to save the data? There may be another ImageJ plugin for this?), but otherwise it should output the graphs which you can save with SaveImages module.

Hope this helps,

Thanks for the answer. :smile:
I have another question.
In code:

makeLine(1, 231, 512, 231);
run(“Plot Profile”);

to what refer the number in bold?

And how to plot vertical line?

I don’t see this in the ImageJ documentation, but almost certainly the 4 values are the coordinates of the begin and end points of the line. Namely
[x_begin, y_begin, x_end, y_end]

So a vertical line in a 512x512 pixel image at x=200 would be