Save individual cropped cells as image

cellprofiler
saveimages

#1

Hey all,

I am trying to export each individual segmented cell as its own image file. I know it is possible to do this on a single image by saving the object mask using the SaveCroppedObjects module and creating a new pipeline to match up and crop the original image, but I have hundreds of images to analyze. Is there a way to do this for many images using CellProfiler or should I use additional software?

Thanks so much!


#2

Hi,

We’re actively considering (like, in the next week or two) adding this functionality to the software, but for now your only option is indeed to first run a pipeline that takes all your hundreds of images and makes masks for each with SaveCroppedObjects (we strongly suggest saving each image’s masks into a folder with that image’s name, which you can do using the “DefaultOutputFolder-Subfolder” save option), then run a second pipeline to apply the masks to your images (and optionally crop them down). It can be done though, and we do it in the lab.
Sorry!


Save all marked objects (nuclei) in a FISH image as separate file
#3

Hey,

Thank you for the response but I was able to do this by writing a simple new version of the SaveCroppedObjects module.


#4

Hi chriskbu,

I don’t know if it’s unusual to ask for such thing on this forum but would you mind sharing your modified module?
I think this could be very useful!!!

Thanks a lot!

Best,

JLx


#5

Hi,
I am also trying to save cropped objects. I tried the “DefaultOutputFolder-Subfolder” save option to save into a subfolders titled with the image name. Is there a variable that should be placed into the subfolder title so that this is done for each image automatically for each repetition through the pipeline? What I’m observing is that the title of subfolders needs to be specified for each image manually.

Thank you


#6

After more tinkering with CellProfiler, I realized that I can use the Metadata labels to name subfolders, using the “DefaultOutputFolder-Subfolder” option, according to each image’s/image set’s metadata. The Metadata labels are accessible by right-clicking in the subfolders field.

Cheers


#7

Hi bcimini,

thank you for your help!
A follow-up question: does the current v.3.1 version of Cell Profiler already contain such an option?

Best, Niklas


#8

Hi Niklas,

3.1.5 does not have it, but we HAVE done it, so you can get it if you run CP from source. Otherwise, look for it in our next release!