Import Sequence: arbitrary limit on file name length


if i import a file with more than 60 characters int he filename (before extension) the slice labels are also truncated, thus removing metadata i am storing in the file name.

is there a good reason for this limitation? i’m running a macro from the command line, so i really don’t care about how much room it takes up in the window. but i don’t like my metadata being silently destroyed…


Hi @dpschreiner,

what do you mean by “truncated”? I just opened a file with more than 70 characters length, and everything appears fine when visualising the file name:



I guess it’s the labels generated when importing an image sequence (mind the title of this topic), or dragging a folder onto the toolbar to open it.

@Wayne any comments on this?


Internally they’re not truncated, it’s just the display in the subtitle bar that has this length. Consider this Groovy script for example:

#@ ImagePlus imp

stack = imp.getStack()
stack.setSliceLabel("abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz", 1)
println stack.getSliceLabel(1) // will print the full label

Note that the subtitle in the image window uses the ImageStack#getShortSliceLabel() method:


The latest ImageJ daily build (1.52d7) fixes several problems related to the handling of image sequence metadata. The Image>Show Info command also no longer truncates one line slice labels to 60 characters.

@dpschreiner, if the daily build does not fix the problem you are experiencing, please upload a couple of images that can be used to reproduce the problem.

View the code changes at