Export image name to database

I am trying to export an image name (captured as metadata from file name) to appear in place of (or in addition to) image number when exporting data on objects to a spreadsheet, to serve as a unique identification tag for all objects characterized from a given set of images. The “Add image metadata to your object data file?” is checked; but the metadata label does not show up in either the Image or the Object spreadsheets. Note that when the metadata is captured from the path (rather than the file name), this information DOES show up in both the Image and Object spreadsheets. However, since the path is not a unique identifier (all the image sets are in the same folder), this is not helpful.

So, is it possible to get CP to recognize and output a label for a set of images in the most recent version of CP (64-bit for Windows)?

Thin-Section_Pipeline4.cp (19.7 KB)


It appears that your regular expression is formatted incorrectly; it’s not capturing anything from the filename and so it just writes a blank into that column.

Assuming that you want everything before the ‘_40x’ text, rather than [A-Z]{3}_[0-9]{3}(?P<Image>)I think you want code[/code]You can use the magnifying glass icon to the right of the setting to confirm your regular expression and make sure it’s getting the right information.