Pad Image Names

The tool allows to pad the numbers of a series of images with leading zeros. If you have for example a time series with the images img1.tif, img5.tif, img10.tif and img15.tif you can pad the numbers to 3 digits which resluts in img001.tif, img005.tif, img010.tif and img015.tif. The advantage of the padded numbering is that the alphanumerical ordering will be the same as the numerical ordering for the numbers and the images will therefore always be treated in the right order.

Getting started

To install the tool, drag the link Pad_Image_Names_Tool.ijm to the ImageJ launcher window. Save it under /plugins/tools in the ImageJ installation and restart ImageJ.

Select the "Pad_Image_Names_Tool" from the >> button of the ImageJ launcher. This will add a button with the label "p" to the current toolset.

the pad image names tool

Options

A right-click in the p-button will open the options dialog of the tool.

the options of the pad image names tool

  • File extension - The file extension of the image files you want to treat. Note that the case does not matter.
  • nr. of digits - The number of digits in the padded version. 3 digits will for example give 001, 002, etc.
  • help - Pressing the help button will open this help page.

Using the tool

Use the options to enter the file extension of the images and the number of digits. Press the "p"-button. A file dialog will be opened. Select the folder containing your image series. The files in the folder will be renamed.

Results

input file series result file series

pad-image-names-tool.png - the pad image names tool (723 Bytes) Volker Baecker, 04/02/2015 11:16 AM

pad-image-names-options.png - the options of the pad image names tool (6.58 KB) Volker Baecker, 04/02/2015 11:20 AM

before.png - input file series (147 KB) Volker Baecker, 04/02/2015 11:30 AM

after.png - result file series (63.2 KB) Volker Baecker, 04/02/2015 11:30 AM