LoadImages needs to preceed LoadSingleImage


#1

Upon running the attached pipeline to completion, I get a charming series of error dialogs reading things like “Module XX_somethingorother contained too many measurements compared to the number of images and has been truncated” before ExportToExcel blows out on the MATLAB error:

[quote]There was a problem running the analysis module ExportToExcel which is number 05. Error using ==> horzcat
CAT arguments dimensions are not consistent.

Stack:
CPwritemeasurements in C:\opt\CompiledCellProfiler_7522\CellProfiler_mcr\CPsubfunctions\CPwritemeasurements.m (223)
ExportToExcel in C:\opt\CompiledCellProfiler_7522\CellProfiler_mcr\Modules\ExportToExcel.m (210)
AnalyzeImagesButton_Callback in C:\opt\CompiledCellProfiler_7522\CellProfiler_mcr\CellProfiler\CellProfiler.m (10890)
gui_mainfcn in C:\opt\CompiledCellProfiler_7522\CellProfiler_mcr\CellProfiler\CellProfiler.m (12633)
CellProfiler in C:\opt\CompiledCellProfiler_7522\CellProfiler_mcr\CellProfiler\CellProfiler.m (57)[/quote]

It does not successfully write any data to the Excel output file. The attached pipeline, which triggers the bug, should start with LoadSingleImage; the bug is not triggered if LoadImages preceeds LoadSingleImage in the pipeline. The bug is only triggered if LoadImages matches against more than one file.

You can find the pipeline at: drop.io/52p3dn0 in exportbug.zip.

Not very serious since there’s an immediate workaround (for all I know this is a documented requirement? I haven’t RTFM’d lately) but confusing for a couple minutes. Data collected with the attached pipeline cannot be recovered using the ExportData data tool.

thanks,
tim


Error in export data to excel
#2

Hi Tim,

The reason for the failure is that rather than loading the same single image every cycle, LoadSingleImage replicates the filename/path information of the one image by the number of the cycles the pipeline runs. Since the pipeline calculate the number of cycles from the LoadImages module, LoadSingleImage replicates the information the incorrect number of times if placed before LoadImages.

This condition in not documented; thanks for pointing it out. In the meantime, as you found out, any LoadSingleImage modules should be placed after the LoadImages module (or at least the first one if you have several).

Regards,
-Mark