mianalysis / mia

Modular, object-based analysis for ImageJ/Fiji
GNU General Public License v3.0
11 stars 2 forks source link

Clearing memory via "remove objects" prevents measurement export in "output control" #188

Open fiona-sievers opened 6 months ago

fiona-sievers commented 6 months ago

In order to save memory space while batch processing, our workflows usually had a "clearing memory" step that uses the "remove objects" module. However, I just ran into the issue that objects cannot be removed without loosing the option to export measurements based on them in the "output control" (which makes sense), even if "retain measurements" is ticked. Removing images via the "remove images" works fine. Are objects and related measurements automatically removed between images in a batch and if not, is there a possibility to do that?

This is not an urgent issue, we can do without the memory clearing. Just wondering whether this might be a user error on my part or potential bug?

Thank you so much!

sjcross commented 6 months ago

Hi Fiona,

Good spot; I'd not noticed this before! When you select "retain measurements" for an image or object, the measurements should be visible in Output Control as things that can be exported; however, it seems I never actually implemented this functionality. I'll try and get it added in for the next version of MIA.

As it happens, when running in batch mode, the images are objects are cleared at the end of each file's processing anyway. This process happens for all images and objects and runs independently of the "Remove images" and "Remove objects" modules, so should be working correctly already. The only information that's retained until all files have completed are the measurements, so these can be written to Excel file.

Cheers, Stephen

fiona-sievers commented 6 months ago

Hi Stephen,

Thank you very much for the quick response and for the info! Seems like the clearing memory step at this point in the pipeline is not necessary anyway then.

Best, Fiona