Automatic resizing of images using calculated values?

HI

I have a pipeline which successfully identifies a series of objects on photos taken at the same magnification.
I would now like to see if it would be possible adapt this pipeline to deal with pictures where the magnification varies at bit. The pipeline uses a somewhat sensitive object shape model within the ‘untangle worms module’ which I would prefer not to have to adapt to diffrent magnifications, consequently I was wondering if I could automatically ‘resize’ images entering the pipeline based on the measurement of a 1cent Euro coin which is included in each photo. i.e. I would like the resize module to use a measurement of the coin to calculate the necessary fractional increase to decrease of the image size to have the same standard scale I have up till now bee using. I have looked in the manual and cannot see how to pass a calculated variable to the resize module. Is there any way to do this?
Thanks
Guy

Hi Guy,

Unfortunately, what you’re describing is not possible, strictly speaking. I’ve created a GitHub issue requesting this: github.com/CellProfiler/CellPro … ssues/1371

Regards,
-Mark

Hi Mark
Thanks a lot for the reply and creating an ‘issue’. I have read that MATLAB can sometimes be used to add functionality, could it be any use in this case?
Thanks
Guy

Hi Guy,

CellProfiler is written in python now, though it used to be in Matlab years ago. You could take a stab at writing your own Python module as a plugin, with help here:
github.com/CellProfiler/CellPro … r/tutorial

Cheers,
David

Thanks for the advice and links. I am a bit of a Python newbie but am trying to go through the links you sent.
At a very naive level, given what I am trying to do, is starting a new module from scratch the way to go or might a better starting point is to take the code from an existing module and adapt that?
I am wondering if taking the ‘calculate math’ module to adapt might the be easiest way to go . Any advice, vague of specific, would be great.
Thanks Guy

I would say the latter; take a look at our wiki on the subject: github.com/CellProfiler/CellPro … our_module
-Mark